Regular Expressions 101

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
(?:youtu\.?be(?:-nocookie)?(?:\.com)?(?:\/|watch\?v=|embed\/)+)([\w-]+)
/
g

Description

regex for get video id in link

Submitted by anonymous - 3 years ago (Last modified 3 years ago)