Yeah, that should work, Jordan.

My plan was to test for three or more protocol delimiters because that's extremely unlikely to show up in my likely data set. It's a hack, but it would have worked.

Since I'm dealing with a very specific problem domain, my URLs have very specific structures and I'm validating against known problems... and things I've seen in real data.

But I like your approach better. :)

-- Patrick


On Aug 23, 2006, at 11:10 PM, Jordan A. Fowler wrote:

Just a heads up, the string "://" more than once in a url is valid. For example, go to any site, (e.g. "http://www.google.com://";) as you can see, this is okay. If you read the RFC, you would find that it is perfectly fine as well. A better solution is to just use a standard url checker. Here's your one liner :):

_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to