Regular Expressions 101

Community Patterns

1...45678...902

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^(?!0*(\.0+)?$)(\d+|\d*\.\d+)$
/

Description

RegEx - Exclude zero

Submitted by http://stackoverflow.com/questions/8910972/regex-exclude-zero - 9 years ago