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
/
((http[s]?\:)\/\/)?([^\?\:\/#]+)(\:([0-9]+))?(\/[^\?\#]*)?(\?([^#]*))?(#.*)?
/
i
Input 1
1
New
http://127.0.0.1:8080/some/path?a=1&b=2&a=3#asdflk www.url-with-querystring.com/?url=has-querystring http://www.google.com#!something http://www.google.com?a=1&b=2&a=3
Extraction
http://127.0.0.1:8080/some/path?a=1&b=2&a=3#asdflk www.url-with-querystring.com/?url=has-querystring http://www.google.com#!something http://www.google.com?a=1&b=2&a=3