Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Community Library
How to contribute
x
Replace last segment of url?
Open Workspace
JavaScript
Match
Created 2021-12-20 23:56
0
Regular Expression
/
(
http
[
s
]
?
:
\/\/
)(
\S
+
\/
)*(?!
=
\/
$
|
$
)(
[^
\/
]
+
\/
)*(?=
\/
$
|
$
)
/
gm
Description
Work in Progress
Submitted by
Anonymous