Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
(?:https?:\/\/)?((?:[^\/\.]+\.)*)([^\/\.]+\.[^\/\.]+)((\/\w+)*)?
/
gm

Description

To test multiple domains, put a slash (/) at the end of each domain

Submitted by tnarh - 4 months ago (Last modified 4 months ago)