Regular Expressions 101

Community Patterns

Numeric input allow commas and decimal point

1

Regular Expression
PCRE (PHP <7.3)

/
^[1-9][\,\d]*(.\d+)?$
/
i

Description

Match numeric input that may or may not include commas and/or decimal point.

Submitted by anonymous - 8 years ago