Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^https?:\/\/(www\.google\..+|\w+\.youtube\.com|\w+\.etools\.ch).*$
/
gm

Description

Regex to match URLs of search result pages and youtube videos.

Submitted by Wei Li - 3 years ago