Last active
March 27, 2018 06:44
-
-
Save skarankevich/24e119211cd55930a4c66075af17342e to your computer and use it in GitHub Desktop.
RegExp for Video ID from YouTube links
This file contains hidden or 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.)?youtu(?:.be|be.com)\/(?:.+?v=|)([a-zA-Z0-9_-]{11})/ | |
Works with: | |
https://www.youtube.com/watch?v=6QjIHnb5Ivs | |
https://youtu.be/6QjIHnb5Ivs?t=37 | |
https://www.youtube.com/watch?v=6QjIHnb5Ivs&feature=youtu.be#t=37 | |
https://youtu.be/6QjIHnb5Ivs | |
http://youtu.be/6QjIHnb5Ivs?t=37 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment