[ACCEPTED]-Javascript regex for integer only, not to start with 0 but allow 0-regex
Accepted answer
^(?:[1-9]\d*|0)$
This is your pattern...
0
Your regex should be ^(?!0.)\d+$
0
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.