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
URL matching
Open Workspace
PCRE (Legacy)
Match
Created 2014-07-02 06:34
0
Regular Expression
/
(?<protocol>
(?:
http
|
ftp
|
irc
)
s
?
:
\/\/
)?(?:
(?<user>
[^
:
\n\r
]
+
)
:
(?<pass>
[^
@
\n\r
]
+
)
@
)?(?<host>
(?:
www
\.
)?(?:
[^
:
\/
\n\r
]
+
)(?:
:
(?<port>
\d
+
)
)?
)
\/
?
(?<request>
[^
?#
\n\r
]
+
)?
\?
?
(?<query>
[^
#
\n\r
]
*
)?
\#
?
(?<anchor>
[^
\n\r
]
*
)?
/
gmx
Description
Complete url matching with storage of various parameters
Submitted by
hjpotter92