Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include dash in the YouTube regex #826

Merged
merged 1 commit into from
Jul 28, 2016
Merged

Include dash in the YouTube regex #826

merged 1 commit into from
Jul 28, 2016

Conversation

benbro
Copy link
Contributor

@benbro benbro commented Jul 28, 2016

YouTube ID can have the following characters [a-zA-Z0-9_-]
\w is missing dash

YouTube ID can have the following characters [a-zA-Z0-9_-]
\w is missing dash
@benbro
Copy link
Contributor Author

benbro commented Jul 28, 2016

In the following example match[3] will be "b" instead of "b-VAxGJdJeQ"

var url = 'https://www.youtube.com/watch?v=b-VAxGJdJeQ';    
url.match(/^(https?):\/\/(www\.)?youtube\.com\/watch.*v=(\w+)/) 

@jhchen jhchen merged commit 7cb8ec1 into slab:develop Jul 28, 2016
@jhchen
Copy link
Member

jhchen commented Jul 28, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants