([\w-]+.)+[\w-]+(/[\w- ./?%&=]*)?
I am using the above expression for URL validation. But the problem is when I give only ‘www.yahoo’ and press the save button I didn’t get any error message. Please offer a solution.
Thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, I guess that post relates more to python. You might find something similar in ASP.NET as well.
But if you want to parse it yourself, you should refer to the RFC 2396 (URI Generic Syntax), which provides the regex and breaks it into components in Appendix B:
EDIT:
After a bit of Googling, I found this in ASP.NET:
System.Uri, e.g.: