Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^[1-9][0-9]?$
/
gm

Description

Simple regular expression for matching 1-99.

Note that this doesn’t accept 01-09.

Submitted by anonymous - 3 years ago