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
/
#([^?&\s]+)
/
g
Input 1
1
New
https://example.com/#section3?a=1a&b=2b https://example.com/#section3&a=1a&b=2b https://example.com/?a=1a&b=2b#section3 https://example.com/&a=1a&b=2b#section3
Extraction
https://example.com/#section3?a=1a&b=2b https://example.com/#section3&a=1a&b=2b https://example.com/?a=1a&b=2b#section3 https://example.com/&a=1a&b=2b#section3