Regular Expressions 101

Community Patterns

Date or empty

0

Regular Expression
PCRE (PHP <7.3)

/
^[0-9]{4}-[0-9]{2}-[0-9]{2}$|^$
/
gm

Description

Matches either date in 1111-11-11 format or empty string

Submitted by anonymous - 3 years ago