can someone tell me the regular expression which will
check if value is 0.0 or 00.00 and that it is a positive value.
can someone tell me the regular expression which will check if value is 0.0
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.
This should work:
/^0*(\.0+)$?/Note: this regex assumes there are no constructs like
+0.00; if you need something like that, use this:/^\+?0*(\.0+)$?/. Also, if you ask me, you should theparseFloat(str) === 0.0equivalent for your language.