Regular Expressions 101

Community Patterns

Positive Numbers greater than 0 with leading zeroes.

2

Regular Expression
ECMAScript (JavaScript)

/
^0*?[1-9]\d*$
/

Description

Accepts all positive numbers above 0. Accepts numbers with leading zeroes e.g.: 0123, 00123.

Submitted by Sandeep Ranka - 9 years ago