Regular Expressions 101

Community Patterns

youtube-links

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^https:\/\/w{3}(.youtube.com)\/(watch\?|playlist\?)(v=\w*-?\w*&list=\w*)|(v=\w*-?\w*)|(list=\w*-?\w*)
/
gm

Description

Regexing all the elements of the youtube playlist

Submitted by anonymous - 2 years ago