Community Patterns

Community Library Entry

1

Regular Expression
Created·2024-05-20 13:58
Flavor·Java

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

Description

Gets the ID of a YouTube Video from any link to it.

Submitted by cheeseburger