Created
February 13, 2018 05:10
-
-
Save phsantiago/96528186cdf0f57990b22da6cb046165 to your computer and use it in GitHub Desktop.
get youtube video id javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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