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

Some youtube/tv links not working #7

Open
laggingreflex opened this issue Dec 19, 2016 · 3 comments
Open

Some youtube/tv links not working #7

laggingreflex opened this issue Dec 19, 2016 · 3 comments

Comments

@tunnckoCore
Copy link
Member

Thanks for the report.

@tunnckoCore
Copy link
Member

tunnckoCore commented Dec 19, 2016

It seems like a simple fix, but I'll investigate more later tonight.

edit: http://regexr.com/3etii - just with simple (?:.*), but that with /control fails (because we search for between 6 and 11, duh)

@tunnckoCore
Copy link
Member

tunnckoCore commented Jul 14, 2017

Simplest and fastest fix currently is change from above and (?!control), so

const regex = /(?:youtube\.com\/\S*(?:(?:\/e(?:mbed))?\/|watch(?:.*)\?(?:\S*?&?v\=))|youtu\.be\/)((?!control)[a-zA-Z0-9_-]{6,11})/;

http://regexr.com/3gbp9

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

No branches or pull requests

2 participants