Regular Expressions 101

Community Patterns

Numeric values greater than zero with decimal

5

Regular Expression
PCRE (PHP <7.3)

/
^[^0|\D]\d{0,9}(\.\d{1,2})?$
/

Description

Pattern that only accept numeric value and greater than zero with up to decimal places�( you can change the decimal places just replace {1,2} depend on how many decimal places you like

Submitted by Eugene To - 9 years ago