Regular Expressions 101

Community Patterns

Your search did not match anything

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(?<=(^19\d\d|^20\d\d)-02-)(0[1-9]|1[0-9]|2[0-9])$|^(19\d\d|20\d\d)-(0[469]|11)-(0[1-9]|1[0-9]|2[0-9]|30)$|^(19\d\d|20\d\d)-(0[13578]|12)-(0[1-9]|1[0-9]|2[0-9]|3[01])$
/
gm

Description

Validation of Date in the format YYYY-MM-DD

Submitted by David - 12 days ago (Last modified 10 days ago)