Possible Duplicate:
PHP validation/regex for URL
Hi,
in my form I have a url field. The user my input all kind of web url's. I use the following regex to validate the url:
/^(https?):\/\/(?:[A-Z0-9-]+.)+[A-Z]{2,6}([\/?].+)?$/i
But this regex handles some url's as invalid, e.g. the following
http://partners.webmasterplan.com/click.asp?ref=537448&site=5643&type=b479&bnb=479
Any ideas how to improve the regex?