Techno
May 25th, 2006, 08:58 AM
Hi.
I found a few regex on the net to validate a url however it doesnt quite work for me.
I want to make sure that the url is validate on this condition:
optional 'www' beginning
ends with a . (we do not care about if it ends in co.uk or com as in the future who knows what other domains will be available)
any ideas?
I also want to make sure that something like this is invalid:
spaces in the url
http://.xxxxxx
that dot should not be there...invalid url
the one I am currently using which appears to work reasonably is this one however it does have it's flaws.
^(http|ftp)://(www\.)?.+\.
I found a few regex on the net to validate a url however it doesnt quite work for me.
I want to make sure that the url is validate on this condition:
optional 'www' beginning
ends with a . (we do not care about if it ends in co.uk or com as in the future who knows what other domains will be available)
any ideas?
I also want to make sure that something like this is invalid:
spaces in the url
http://.xxxxxx
that dot should not be there...invalid url
the one I am currently using which appears to work reasonably is this one however it does have it's flaws.
^(http|ftp)://(www\.)?.+\.