Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(?:youtube(?:-nocookie)?\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)((?:\w|-){11})
/
gm

Description

AMP - chinatimes

Submitted by anonymous - 3 years ago