Regular Expressions 101

Community Patterns

Community Library Entry

6

Regular Expression
PCRE (PHP <7.3)

/
^(0[1-9]|[1-2][0-9]|3[0-1])\/(0[1-9]|1[0-2])\/(\d{4})$
/
gm

Description

From 1970 to 2015 Replace: (\d{4})$ for (19[7-9]\d|20[0-1][0-5])$

Submitted by Valdeir Santana - 9 years ago