我需要一个正则表达式来验证整数。05 and 00是不允许的,但是0被允许。 目前我有这个:
05 and 00
0
/^[1-9]\d*$/
但它不允许0。感谢帮助。
^(?:[1-9]\d*|0)$
这就是你的模式...