Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(https:\/\/youtu\.be\/|http:\/\/www\.youtube\.com\/watch\?v=).*$
/
gm

Description

Validate an URI to YouTube video.

Submitted by anonymous - a year ago (Last modified a year ago)