Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
.*[\.\s](?<domain>.*\.\S*)\b
/
gm

Description

Grabs the domain of a url

Submitted by anonymous - 6 years ago