Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
((19\d\d|20\d\d)-(0\d|1[0-2])-([0-2]\d|30|31))T((\d{2}):(\d{2}):(\d{2}))(?:\.(\d{3,6}))?(?:((?:([+-])(?:(0\d|1[012]))):?([0-5]\d))|Z?)
/

Description

match ISO 8610 formatted dates

Submitted by marco benuzzi - 8 years ago