Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@brunodles
Last active March 16, 2024 23:15
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunodles/927fd8feaaccdbb9d02b to your computer and use it in GitHub Desktop.
Save brunodles/927fd8feaaccdbb9d02b to your computer and use it in GitHub Desktop.
This is a youtube regex to get video id
(?:https?:\/\/)?(?:www\.)?youtu\.?be(?:\.com)?\/?.*(?:watch|embed)?(?:.*v=|v\/|\/)([\w\-_]+)\&?
@Maxmaxs5
Copy link

Maxmaxs5 commented Aug 3, 2018

This is perfect! Helped me learn about Regex as well as matching any possible youtube link. Well done and thank you!

@MrZillaGold
Copy link

@ddruganov
Copy link

thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment