Youtube Video Link Regular Expression

Category: URI

A regular expression that matches all valid Youtube Video Links (short links are supported as well).

/http(?:s?):\/\/(?:www\.)?youtu(?:be\.com\/watch\?v=|\.be\/)([\w\-\_]*)(&(amp;)?[\w\?=]*)?

Youtube Video Link Example:

  • http://www.youtube.com/watch?v=BeG_UU-Bf5k
  • https://www.youtube.com/watch?v=BeG_UU-Bf5k
  • http://youtu.be/BeG_UU-Bf5k

See Also:

Rate This Regex
Sending
User Review
0 (0 votes)

Expression Flags

Flags Description
i Ignore case sensitive.
g Allows global search.
m Allows multiline search.