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

More functional regex for URL parsing #8

Closed
wants to merge 2 commits into from
Closed

More functional regex for URL parsing #8

wants to merge 2 commits into from

Conversation

LeoColomb
Copy link

This PR is more for a discussion about URL parsing than a direct PR.
Just found that a lot of URLs has been excluded with the actual regex, then I tried to find something better.

My proposal is based on Stephen Hay work as seen on https://mathiasbynens.be/demo/url-regex.
Still excluding parentheses, so links like https://en.wikipedia.org/wiki/Kansas_(disambiguation) are not well parsed.

🚀

@sindresorhus
Copy link
Owner

sindresorhus commented Sep 25, 2017

The parens issue is exactly why we're using a simpler regex: aca71b8

@LeoColomb
Copy link
Author

Oh, good to know!
That said the "simple" regex is very complicated, isn't it? 😇

@sindresorhus
Copy link
Owner

I think this would be a better solution: kevva/url-regex#35 (comment)

@LeoColomb
Copy link
Author

Great! Then closing in favor of #9 😺

@LeoColomb LeoColomb closed this Sep 25, 2017
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