Regular Expressions 101

Community Patterns

GET formated URLs

1

Regular Expression
PCRE (PHP <7.3)

/
(?(DEFINE) (?<WebAddress> (?&Protocol){0,}(?&Host)(?:\:(?&Port)){0,1}(?&Path){0,1})(?=\s|$) (?<Protocol> \w{2,}\:\/\/) (?<Host> (?&NameParts)(?&Suffix)) (?<NameParts> (\w{2,}\.){1,}) (?<Suffix> (\w{2,})) (?<Port> (\d{1,5})) (?<Path> (\/\S{1,})) ) ((?&WebAddress))
/
xmg

Description

no description available

Submitted by rleonard - 8 years ago