Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
PCRE (PHP <7.3)

/
(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?
/
g

Description

grab youtube & vimeo id

Submitted by mi-ca.ch - 9 years ago