Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
(https?:\/\/)?(www.)?((player.vimeo.com\/video\/[0-9]{9})|((youtube.com|youtu\.be)\/embed\/([\w-]{9,11})))
/
gm

Description

Detecta los patrones para enlaces de videos embebidos de YouTube y Vimeo

Submitted by anonymous - 3 years ago