Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Community Library
How to contribute
x
YouTube Video ID
Open Workspace
Java
Match
Created 2024-05-20 13:58
1
Regular Expression
"
(?<=
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
Description
Gets the ID of a YouTube Video from any link to it.
Submitted by
cheeseburger