lambdaisland / uri

A pure Clojure/ClojureScript URI library
Mozilla Public License 2.0
243 stars 21 forks source link

Question: how to validate if string is a valid URI? #15

Closed tomekw closed 4 years ago

tomekw commented 4 years ago

Thank you for the library! 👏

I read the code and played with the uri-regex but with all these groupings it's hard to check if string is a valid URI, like with (re-matches).

Any ideas regarding canonical way of doing such thing? 🤔

plexus commented 4 years ago

It really depends on your use case. There are a lot of things that are strictly speaking valid uris, but you probably only care for a subset of those. I would google for uri regexes and compare some approaches. Checking if something qualifies as a uri is not something this library does.

tomekw commented 4 years ago

Thanks!