Regular Expressions 101

Library entries

Website (scheme,host,port,path and query)

Vote

-1

Regular Expression
pcre

/
^(?:(?'scheme'http[s]?):\/\/)?(?'host'[a-z0-9_\-.]+)(?:\:(?'port'[0-9]+))?(?'path'\/[^\?\s]*)?(?:\?(?'query'\S+))?
/
gm

Description

Loading markdown...
Submitted by anonymous - 4 years ago