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
Parse Entire URL
Open Workspace
PCRE (Legacy)
Match
Created 2015-11-12 15:09
1
Regular Expression
/
https
?
:
\/\/
(?:
www
\.
)?(
[
-a
-
zA
-
Z0
-
9@:%._
\+
~#=
]
{2,256}
)(
\.
[
a
-
z
]
{2,6}
\b
)*(
\/
[
\/
\d\w
\.
-
]
*
)*(?:
[
\?
]
)*(
.
+
)*
/
gi
Description
This regex is a mashup that strips protocol, domain and URI into seperate capture groups.
Submitted by
Robert Kozora