Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(^[-+]?[1-9]\d*$)
/
gm

Description

Integers with no leading zeros ie. 0234 or -0486 is invalid

Submitted by anonymous - 5 years ago