Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

extract url with parameters that end in close parenthesis #72

Open
markevaul opened this issue Apr 22, 2014 · 6 comments
Open

extract url with parameters that end in close parenthesis #72

markevaul opened this issue Apr 22, 2014 · 6 comments

Comments

@markevaul
Copy link

when extracting this url, the last parenthesis is always dropped:

http://www.alfred.com/Products/RefinedListing.aspx?q=@SKU=(98-40784,98-42565)

@jakl
Copy link
Contributor

jakl commented Apr 28, 2014

Thanks, @KL-7 and I changed paren handling recently because tweets often contain urls inside parens, but this definitely seems like a bug. We'll take a look at the regexes.

For anyone looking at this, can quickly test behavior here: http://twitter.github.io/twitter-text-js/

@markevaul
Copy link
Author

I have a pull request on twitter-text-js waiting. I took your balanced parens method for the url and applied it to the query parameters as well.

@jakl
Copy link
Contributor

jakl commented Apr 28, 2014

Linking your JS pull request:
twitter-archive/twitter-text-js#120

@jakl
Copy link
Contributor

jakl commented Apr 28, 2014

Cool, now to port this to ruby, java, and obj-c.
Are you comfortable modifying the regexes in those repos? One of us can do it too.

@markevaul
Copy link
Author

I don't have those environments set up, so it's difficult for me to test them locally. You'd probably be able to do it faster.

I'm using a dotnet port that I ported over from the java, but I ended up using all the regexes from javascript because the java regex engine has a bunch of build in named character classes that aren't available in dotnet.

@jakl
Copy link
Contributor

jakl commented Apr 28, 2014

Sounds good, thanks again!

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

No branches or pull requests

2 participants