jhermsmeier / uri.regex

URI Regular Expression
17 stars 4 forks source link

URI or URL? #1

Closed rsertelon closed 11 years ago

rsertelon commented 11 years ago

Hi,

It's stated that this regular expression matches URIs, although it seems that it can only match URLs.

This is a valid URI that would not be matched: mina:tcp://mainframeip:4444?textline=true

Cheers,

jhermsmeier commented 11 years ago

Hey, well... yes it is supposed to match URIs, and you have found a perfect sample of a case where that does not apply.

I haven't really had the time to add proper tests and stuff, but I'll do that and try to fix this in the next few days, if I can find the time for that.

Thanks & Cheers!

rsertelon commented 11 years ago

No problem, thanks for sharing it :)

koppor commented 11 years ago

Other pages with regular expressions for URIs are http://jmrware.com/articles/2009/uri_regexp/URI_regex.html and http://timezra.blogspot.de/2010/05/regex-to-validate-uris.html. Maybe, one of them helps to improve the provided regex. Here, only your regex worked in JavaScript.

jhermsmeier commented 11 years ago

Thanks @koppor! Will have a look at it. I must confess I haven't had enough time yet to take on this issue, but I'll definitely have tomorrow!

jhermsmeier commented 11 years ago

@BluePyth it should work now, finally. I still have to update the tests to reflect that, but what I can tell from eyeballing the results of my quick tests I'd say; you're good to go.

Sorry for any inconvenience I may have caused.

rsertelon commented 11 years ago

@jhermsmeier Thanks a lot ;) No problem nor inconvenience :) Thanks again!

Cheers,