Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^-?\d{0,9}(\.\d{1,2})?$
/
gm

Description

验证阿拉伯数字金额 "-999999999 ~ 999999999" ,小数点后面保留2位

Submitted by cp.l - 4 years ago