November 24, 2003
RegEx to Match a URL
Earlier today I needed URL input validation (my form prompted for a URL, I needed to validate that what was provided was a syntactically valid URL). URL validation is actually rather complicated, but the following regular expression worked for me: https?://([-w.]+)+(:d+)?(/([w/_.]*(?S+)?)?)? This...