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
/
(google\.com)\/(to_the_end)\/(.*[^\/])\/?$
/
gm
Input 1
1
New
google.com/to_the_end/ google.com/to_the_end/faa/fee/ google.com/to_the_end/faa/fee/fii
Substitution
$1/$3/$2
google.com/to_the_end/ google.com/to_the_end/faa/fee/ google.com/to_the_end/faa/fee/fii