Regular Expressions 101

Community Patterns

There does not seem to be anything here

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?P<Protocol>http[s]?:\/\/)?(?P<Host>(?:www.)?\w+.(?P<Domain>\w{1,10}))(?P<Query>.+)
/
gm

Description

separate all parts of an url

Submitted by Kai - 9 years ago