Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
#
^movies/([a-z])(?:/page/(\d+)|)/?$
#
gm
Input 1
1
New
movies/a movies/a/ movies/b movies/c movies/aquaman movies/ant-man movies/a/page/2 movies/a/page/2/ movies/a/page (the 2nd and last ones include a trailing slash, i.e. /)
Extraction
movies/a movies/a/ movies/b movies/c movies/aquaman movies/ant-man movies/a/page/2 movies/a/page/2/ movies/a/page (the 2nd and last ones include a trailing slash, i.e. /)