Does anybody have a regexp for validating URLs? I found this one and am
trying to adapt it:
It depends what rules you’re trying to validate against. The simplest
thing to do is probably to use the regex from RFC 2396:
and then split out the component parts and validate them separately.
That way you can check that the server name has a reasonable tld, and
that the scheme matches something valid, and so on. Check the rfc for
I also found this one, but, um, well…
Ick! Mind-bleach, quick!