Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^(?:(?<protocol>\w*?):\/\/(?<authority>(?<mnemonic>\w*).(?<host>(?<clientid>(?<client>\w*)-?(?<environment>\w*)).(?<domain>[\w-.]*))(?::?(?<port>\d*)))\/(?<path>[\w-]*)\s*$)
/
gm

Description

Adds in teardown of the client id, environment, and domain

Submitted by anonymous - 6 years ago