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
extract video id from youtube url
Open Workspace
PCRE (Legacy)
Match
Created 2015-08-05 03:56
1
Regular Expression
/
(
https
?
:
\/\/
)?(
www
.
)?(
youtube
\.
com
|
youtu
\.
be
|
youtube-nocookie
\.
com
)
\/
(?:
embed
\/
|
v
\/
|
watch
\?
v=
|
watch
\?
list=
(
.
*
)
&v=
|
watch
\?
(
.
*
[^
&
]
&
)
v=
)?(
(
\w
|
-
){11}
)(
&list=
(
\w
+
)
&
?
)?
/
gims
Description
No description provided.
Submitted by
egg-