Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^(19[0-9][0-9]|20[012][0-9])$
/
gm

Description

RegEx that validates input that are values in years between 1900 and 2029

Submitted by anonymous - 7 years ago