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 Regex
Open Workspace
PCRE2 (PHP)
Match
Created 2021-06-18 07:12
0
Regular Expression
/
^
(?:
https
?
:
\/\/
\w
*
\.
?
)?(
youtube
\.
com
\/
|
youtu
\.
be
?
\/
)+(
watch
\?
v=
|
shorts
\/
)?+(
\w
+
)
/
gm
Description
Regex for youtube pattern
Submitted by
Suraj Shah