Regular Expressions 101

Community Patterns

Community Library Entry

14

Regular Expression
Recommended
PCRE (PHP <7.3)

/
^((?:(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2}(?:\.\d+)?))(Z|[\+-]\d{2}:\d{2})?)$
/
gm

Description

Validates a RFC3339 DateTime format. Does not validates the Data

Submitted by anonymous - 9 years ago