Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jezmck/ec239c21e24b714c9ec30b9670156b36 to your computer and use it in GitHub Desktop.
Save jezmck/ec239c21e24b714c9ec30b9670156b36 to your computer and use it in GitHub Desktop.
Examples of the various YouTube URL formats
/^(https?:)?(\/\/)?((www\.|m\.)?youtube\.com\/((watch)?\?(feature=\w*&)?vi?=|embed\/|vi?\/|e\/)|youtu.be\/)([\w\-]{10,20})/i
[8]
http://www.youtube.com/?feature=player_embedded&v=dQw4w9WgXcQ
http://www.youtube.com/?v=dQw4w9WgXcQ
http://www.youtube.com/e/dQw4w9WgXcQ
http://www.youtube.com/embed/tmY-G6sngk8
http://www.youtube.com/embed/tmY-G6sngk8?rel=0
http://www.youtube.com/v/-wtIMTCHWuI?version=3&autohide=1
http://www.youtube.com/v/0zM3nApSvMg?fs=1&hl=en_US&rel=0
http://www.youtube.com/v/dQw4w9WgXcQ
http://www.youtube.com/watch?feature=player_embedded&v=dQw4w9WgXcQ
http://www.youtube.com/watch?v=-wtIMTCHWuI
http://www.youtube.com/watch?v=0zM3nApSvMg#t=0m10s
http://www.youtube.com/watch?v=6dwqZw0j_jY&feature=youtu.be
http://www.youtube.com/watch?v=gldJbbNnk3s&playnext_from=TL&videos=osPknwzXEas&feature=sub
http://www.youtube.com/watch?v=oTJRivZTMLs&feature=youtu.be
http://youtu.be/-wtIMTCHWuI
http://youtu.be/dQw4w9WgXcQ?feature=youtube_gdata_player
http://youtube.com/?feature=channel&v=oTJRivZTMLs
http://youtube.com/?v=oTJRivZTMLs&feature=channel
http://youtube.com/?vi=oTJRivZTMLs&feature=channel
http://youtube.com/v/dQw4w9WgXcQ?feature=youtube_gdata_player
http://youtube.com/vi/dQw4w9WgXcQ?feature=youtube_gdata_player
http://youtube.com/vi/oTJRivZTMLs&feature=channel
http://youtube.com/watch?v=oTJRivZTMLs&feature=channel
http://youtube.com/watch?vi=oTJRivZTMLs&feature=channel
https://m.youtube.com/watch?v=dQw4w9WgXcQ
https://www.youtube.com/embed/tmY-G6sngk8?rel=0
https://www.youtube.com/v/0zM3nApSvMg?fs=1&hl=en_US&rel=0
https://www.youtube.com/watch?v=0zM3nApSvMg#t=0m10s
https://www.youtube.com/watch?v=0zM3nApSvMg&feature=feedrec_grec_index
https://www.youtube.com/watch?v=dQw4w9WgXcQ
https://www.youtube.com/watch?v=ishbTyLs6ps&list=PLGup6kBfcU7Le5laEaCLgTKtlDcxMqGxZ&index=106&shuffle=2655
https://www.youtube.com/watch?v=yZv2daTWRZU&feature=em-uploademail
https://youtu.be/oTJRivZTMLs?list=PLToa5JuFMsXTNkrLJbRlB--76IAOjRM9b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment