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
/
(.*\.[a-z]+\/?(?:[\w]+(?:\/[\w]+)*)*)
/
g
Input 1
1
New
http://stackoverflow.co.th http://stackoverflow.com http://stackoverflow.co.th/ http://stackoverflow.com/ http://stackoverflow.com/a/ http://stackoverflow.com/questions/ http://stackoverflow.com/questions/12345 http://stackoverflow.com/12345/
Substitution
http://stackoverflow.co.th http://stackoverflow.com http://stackoverflow.co.th/ http://stackoverflow.com/ http://stackoverflow.com/a/ http://stackoverflow.com/questions/ http://stackoverflow.com/questions/12345 http://stackoverflow.com/12345/