Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^([1-9]+|0)(\.[0-9]{1,2})?$
/
g

Description

匹配小数位的整数,或者匹配整数

Submitted by solelyli - 4 years ago