I have an MVC3 C#.NET web app. I have two properties that are doubles and can have the (value >= 0) and (value <=2). I would like to use a regular expression to limit the values for thes two fields. Ideas?
Share
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.
I really don’t think regex is a good idea here, but if you want to know …
Let’s break it down to what you need to match: 0(.XXXX), 1(.XXX), and 2(.0)