Definition Group(?(DEFINE)
(?<scheme>[a-z][a-z0-9+.-]*)
(?<userpass>([^:@\/](:[^:@\/])?@))
(?<domain>[a-z0-9]+(-[a-z0-9]+)*(\.[a-z0-9]+(-[a-z0-9]+)*)+)
(?<ip>(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])))
(?<host>(?&ip))
(?<port>(:[\d]{1,5}))
(?<path>([^?;\#]*))
(?<query>(\?[^\#;]*))
(?<anchor>(\#.*))
) Group scheme(?<scheme>[a-z][a-z0-9+.-]*) a-zone character from a (9710) to z (12210) (case sensitive)
Character Class[a-z0-9+.-]* *matches any number of characters from the set below:
a-zone character from a (9710) to z (12210) (case sensitive)
0-9one character from 0 (4810) to 9 (5710)
+the literal + (4310 / 538 / 2B16)
.the literal . (4610 / 568 / 2E16)
-the literal - (4510 / 558 / 2D16)
Group userpass(?<userpass>([^:@\/](:[^:@\/])?@)) Group 3([^:@\/](:[^:@\/])?@) Negated Character Class[^:@\/] :the literal : (5810 / 728 / 3A16)
@the literal @ (6410 / 1008 / 4016)
\/the literal / (4710 / 578 / 2F16)
?repeats the group contents below at most once:
:the literal : (5810 / 728 / 3A16)
Negated Character Class[^:@\/] :the literal : (5810 / 728 / 3A16)
@the literal @ (6410 / 1008 / 4016)
\/the literal / (4710 / 578 / 2F16)
@the literal @ (6410 / 1008 / 4016)
Group domain(?<domain>[a-z0-9]+(-[a-z0-9]+)*(\.[a-z0-9]+(-[a-z0-9]+)*)+) +matches at least one character from the set below:
a-zone character from a (9710) to z (12210) (case sensitive)
0-9one character from 0 (4810) to 9 (5710)
*repeats the group contents below any number of times:
-the literal - (4510 / 558 / 2D16)
+matches at least one character from the set below:
a-zone character from a (9710) to z (12210) (case sensitive)
0-9one character from 0 (4810) to 9 (5710)
Group 7(\.[a-z0-9]+(-[a-z0-9]+)*)+ +repeats the group contents below at least once:
\.the literal . (4610 / 568 / 2E16)
+matches at least one character from the set below:
a-zone character from a (9710) to z (12210) (case sensitive)
0-9one character from 0 (4810) to 9 (5710)
*repeats the group contents below any number of times:
-the literal - (4510 / 558 / 2D16)
+matches at least one character from the set below:
a-zone character from a (9710) to z (12210) (case sensitive)
0-9one character from 0 (4810) to 9 (5710)
Group ip(?<ip>(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))) Group 10(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])) 1st Alternative([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4} Group 11([0-9a-fA-F]{1,4}:){7,7} {7,7}repeats the group contents below exactly 7 times:
Character Class[0-9a-fA-F]{1,4} {1,4}matches between 1 and 4 characters from the set below:
0-9one character from 0 (4810) to 9 (5710)
a-fone character from a (9710) to f (10210) (case sensitive)
A-Fone character from A (6510) to F (7010) (case sensitive)
:the literal : (5810 / 728 / 3A16)
Character Class[0-9a-fA-F]{1,4} {1,4}matches between 1 and 4 characters from the set below:
0-9one character from 0 (4810) to 9 (5710)
a-fone character from a (9710) to f (10210) (case sensitive)
A-Fone character from A (6510) to F (7010) (case sensitive)
2nd Alternative([0-9a-fA-F]{1,4}:){1,7}: Group 12([0-9a-fA-F]{1,4}:){1,7} {1,7}repeats the group contents below between 1 and 7 times:
Character Class[0-9a-fA-F]{1,4} :the literal : (5810 / 728 / 3A16)
:the literal : (5810 / 728 / 3A16)
3rd Alternative([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4} 4th Alternative([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2} 5th Alternative([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3} 6th Alternative([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4} 7th Alternative([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5} 8th Alternative[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6}) 9th Alternative:((:[0-9a-fA-F]{1,4}){1,7}|:) 10th Alternativefe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,} 11th Alternative::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]) 12th Alternative([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]) Group host(?<host>(?&ip)) Group port(?<port>(:[\d]{1,5})) Group path(?<path>([^?;\#]*)) Group query(?<query>(\?[^\#;]*)) Group anchor(?<anchor>(\#.*))
the literal ↵ (1010 / 128 / A16)
the literal ↵ (1010 / 128 / A16)
^start of string
Non-Capturing Group(?:(?&scheme):\/\/)? (?&userpass)?optionally calls group userpass as a subroutine
Group address(?<address>(?&host)) (?&port)?optionally calls group port as a subroutine
\/?optionally matches the literal / (4710 / 578 / 2F16)
(?&path)?optionally calls group path as a subroutine
(?&query)?optionally calls group query as a subroutine
(?&anchor)?optionally calls group anchor as a subroutine
$end of string, or before its final line terminator
g modifier: global. Finds all matches instead of stopping after the first