I am not very good with regular experessions and need a pattern to only allow URLS that begin with HTTP://www.
I have found lots of examples for URLS but they all seem over compliated and I’m sure it should be very simple. Can anyone help?
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.
HTTP://www– they must start with that? ok. that’s your regular expression. throw case insensitive on it and you’re all set.Things get interesting with regular expressions when you should ‘accept’ a string that can change. do you need to allow ‘https’ ? will you have an authorization section in the url before the domain? (you would know already if you did) that’s when a Regex can get complicated.
Edit
there could be a better way, but I haven’t done this in an XSD in a while. This will match