Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(www.|https?:\/\/(?:www.)?)?([a-z-_0-9]*)(?:\.)
/
gm

Description

'www.xakep.ru' === xakep 'http://github.com/carbonfive/raygun' === github 'https://www.**cnet**.com' === cnet 'xewveqmwcz90sl64.co/' === xewveqmwcz90sl64

Submitted by anonymous - 4 years ago