Community Patterns

Community Library Entry

0

Regular Expression
Created·2022-09-16 13:12
Flavor·PCRE (Legacy)

/
(?<=watch\?v=|\/videos\/|embed\/|youtu.be\/|\/v\/|watch\?v%3D|%2Fvideos%2F|embed%2F|youtu.be%2F|%2Fv%2F)[^#\&\?\n]*
/
ig
Open regex in editor

Description

You can easily extract YouTube IDs, excluding the paths and parameters.

Submitted by anonymous