Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
(https?:\/\/)?(www\.)?youtu\.?be(\.com\/watch\?v=)?\/?
/
g

Description

Created for replacing everything except video ID from YouTube URL

Submitted by kamilius - 9 years ago