Home All Groups Group Topic Archive Search About

URL Regular Expression Validator

Author
30 Jan 2006 5:15 AM
astpc.net
Hi,

I'm using the following validation expression for an URL:
^(ht|f)tp(s?)\:\/\/[a-zA-Z0-9\-\._]+(\.[a-zA-Z0-9\-\._]+){2,}(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_]*)?$

I'm having an issue with url having only 1 dot. for eg
http://schlockmercenary.com

Can anyone pls help me fixed this issue.

Thanks

Author
30 Jan 2006 2:13 PM
Rocky
"^(ht|f)tp(s?)://([\w-]+\.)+[\w-]+(/[\w-./?%&=]*)?$"


<astpc.***@gmail.com> wrote in message
Show quoteHide quote
news:1138598107.848266.173350@g44g2000cwa.googlegroups.com...
> Hi,
>
> I'm using the following validation expression for an URL:
> ^(ht|f)tp(s?)\:\/\/[a-zA-Z0-9\-\._]+(\.[a-zA-Z0-9\-\._]+){2,}(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?$
>
> I'm having an issue with url having only 1 dot. for eg
> http://schlockmercenary.com
>
> Can anyone pls help me fixed this issue.
>
> Thanks
>
Author
1 Feb 2006 5:18 AM
AL
It worked... thanks