HI I have a small validation to check if values are below 170000,
Here is what i have tried but it has some small issues. values can range from 0 – 170000
/^(?:[1-9]\d{0,4}|[1-6]\d{3}|170000)$/
Please some one rectify and explain this.
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.
Why do you need regex for that?
Can’t
if (value <= 170000 && value >= 0)achieve your job?