- The first Regular Expression Library on the Web!

Please support RegExLib Sponsors


Regular Expression Details

Title Test Find Yet another URI checker
Checks whether the entered string looks like a URI, with a specified protocol. Optionally, you can add the port number, and some GET variables. The control is quite loose, but it's a choice of mine. Comments and corrections are welcome.
this:// | this://is.accept.ed?too= | and://
Non-Matches | neither:// | abs://
Author Rating: Not yet rated. Claudio Di Ciccio
Your Rating
Bad Good

Enter New Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Some valid URIs don't validate
Name: Tynach
Date: 1/19/2012 12:21:02 AM
Hi, I noticed you did a URI checker as well. I did mine in sort of a... Well, I didn't understand regular expressions, so I figured the most difficult regex possible would be for a URI, and forced myself to learn. Anyway, there are some very WEIRD URIs in the documentation dealing with the URI scheme, and it took me a long time to get a regex that matched all of them. The regex I finally came up with is here: Some of the weirder URIs in the URI scheme documentation, I've put in the list of 'Matches' there. It's interesting to note, that the last two of your example non-matches actually match with my regex - and they both may very well be valid URIs - if very non-standard. Of my list of ones that do match (that should match), your regular expression only manages to match 3 of them - the FTP, HTTP, and Telnet ones. I saw you welcomed comments and corrections, so I figured I ought to post - though I kinda doubt you'll see this...

Copyright © 2001-2018, | ASP.NET Tutorials