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