Skip to content

Instantly share code, notes, and snippets.

@brunodles
Last active April 24, 2024 07:30
Show Gist options
  • Select an option

  • Save brunodles/927fd8feaaccdbb9d02b to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

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!

@egorprnn
Copy link
Copy Markdown

@ddruganov
Copy link
Copy Markdown

thanks a lot!

@Kaligula0
Copy link
Copy Markdown

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