A URL should start with http://
or www.
http://google.com
or
www.google.com
My Regular expression is:
[RegularExpression(@"^http(s?)\:\/\/[0-9a-zA-Z]([.\w][0-9a-zA-Z])(:(0-9))(\/?)([a-zA-Z0-9\\.\?\,\'\/\\\+&%\$#_])?$", ErrorMessage = "*")]
My code is working fine for http://google.com
but not for www.google.com
.
Does anyone have any suggestions?