How can ^\d+$
be improved to disallow 0
?
EDIT (Make it more concrete):
Examples to allow:
1
30
111
Examples to disallow:
0
00
-22
It doesn't matter if positive numbers with a leading zero are allowed or not (e.g. 022
).
This is for Java JDK Regex implementation.
076
? – Sectary