Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
https?:\/{2}(m\.|www\.)?(youtube\.com|youtu\.be)(\/[a-z0-9?=/]*)?
/
gmi

Description

Match YouTube URLs

Submitted by Xaotic - 8 years ago