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 - 2 months ago (Last modified 2 months ago)