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:
- Video & Audio Link Regular Expression
- Vimeo Video Link Regular Expression
- Regex Extract Video ID From Youtube Link