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
get parts of URL
Open Workspace
PCRE (Legacy)
Match
Created 2016-01-26 09:17
0
Regular Expression
/
(?<protokoll>
[
a
-
z
]
*
)
:
\/\/
?
(?<domain>
[
a
-
z.-
]
*
)?(?<file>
[^
?#
]
*
)?
[
?
]
(?<parameter>
[^
#
]
*
)?
[
#
]
(?<anker>
.
*
)?
/
Description
split URL in protokoll, domain, file(with path), parameter and anker
Submitted by
Candyman1332