Click here to Skip to main content
15,888,181 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
having ^[1-9]{1,6}$ regular expression allowed only 1 to 9 digit. i want expression that not allowed zero in digit but allowed 10,20,30 in value 1-10 digit allowed but user put "0" not allowed.
Posted

1 solution

Try:
^[1-9][0-9]{0,5}$
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900