Skip to content

Some youtube/tv links not working #7

New issue

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

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

Already on GitHub? # to your account

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

@laggingreflex
Copy link

laggingreflex commented Dec 19, 2016

@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

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

No branches or pull requests

2 participants