Skip to content

Instantly share code, notes, and snippets.

@phsantiago
Created February 13, 2018 05:10
Show Gist options
  • Save phsantiago/96528186cdf0f57990b22da6cb046165 to your computer and use it in GitHub Desktop.
Save phsantiago/96528186cdf0f57990b22da6cb046165 to your computer and use it in GitHub Desktop.
get youtube video id javascript
"https://www.youtube.com/watch?v=lgJOJAmXlBw".match(/(youtu\.be\/|youtube\.com\/(watch\?(.*&)?v=|(embed|v)\/))([^\?&"'>]+)/)[5];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment