Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^\/(?:(?:[\w\d-]\/?)*[A-Za-z0-9])$
/
gm
Input 1
1
New
/path /valid/path /this/regex/uses/A-Za-z0-9-_/and/should/end/with/A-Za-z0-9 invalid/path another/invalid/path/ /this/is/also/invalid/ /whoops//ies //not/even/a/valid/path
Substitution