Community Patterns

Community Library Entry

-5

Regular Expression
Created·2014-02-11 10:22
Flavor·PCRE (Legacy)

/
^(20|21)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$
/
Open regex in editor

Description

Date with this format YYYY-MM-DD and year start 20 or 21 like 2014

Submitted by cisc0