Community Patterns

Community Library Entry

9

Regular Expression
Created·2013-11-28 13:30
Flavor·PCRE (Legacy)

/
(?<=\d\/|\.be\/|v[=\/])([\w\-]{11,})|^([\w\-]{11})$
/
gim
Open regex in editor

Description

This regex will match any Youtube video ID thrown at it and return one capturing group containing the ID.

Submitted by Jacob Overgaard