且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

没有前导零的数字的正则表达式

更新时间:2022-11-14 17:36:23

更新:

^([0-9]|[1-9][0-9])$

匹配 0-99.不匹配带前导零的值.根据您的应用程序,您可能需要对括号和 或 符号进行转义.

Matches 0-99. Doesn't match values with leading zeros. Depending on your application you may need to escape the parentheses and the or symbol.