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

url_detect()? #37

Open
hrbrmstr opened this issue Nov 18, 2015 · 6 comments
Open

url_detect()? #37

hrbrmstr opened this issue Nov 18, 2015 · 6 comments
Milestone

Comments

@hrbrmstr
Copy link
Collaborator

vis a vis http://stackoverflow.com/questions/33773299/r-regex-to-extract-url-from-text

@Ironholds
Copy link
Owner

Ooh, painful. We'd have to do it in R for /that/ use case. We could do it in C++, if we wanted actual URLs, but those aren't actual URLs.

@hrbrmstr
Copy link
Collaborator Author

somewhat painful. If we go for "best guess regex" then we can use gruber's fairly-comprehensive-but-not-too-aggressive regex for it https://gist.github.com/gruber/249502 and https://gist.github.com/gruber/8891611

@Ironholds
Copy link
Owner

Good idea! We could always have url_detect(x, strict = FALSE), where strict determines if it relies on a :// find (easy enough in C++, and fast) or a regex (harder and slow)

@Ironholds
Copy link
Owner

Could we use stringi for this?

@Ironholds
Copy link
Owner

Note to self: we can use C++11 for this, since everyone and their pet dog seems to be into C++11 these days.

@hrbrmstr
Copy link
Collaborator Author

hrbrmstr commented Sep 14, 2017 via email

@Ironholds Ironholds added this to the 1.8.0 milestone Jan 4, 2018
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