Created
January 4, 2018 06:16
-
-
Save waitingallday/e3b3e86c60c861a78d3a35d1e2e5a4e1 to your computer and use it in GitHub Desktop.
regex for youtube URL, extracts videoid into named group
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
(?:[youtbe.com\/wahd\?])(?:\w+=[\w+,.-]+\&)*(?:v=)?(?<videoid>[a-zA-Z0-9\-\_]{6,60})(?:\&\w+=[\w+,.-]+)*$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment