Regular Expressions 101

Community Patterns

Timestamp including time zone information

1

Regular Expression
PCRE (PHP <7.3)

/
\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}([.]\d{1,3})?(Z|[-+]\d{2}:\d{2})
/
g

Description

Simple check on the correct format of a time stamp including time zone information

Submitted by anonymous - 9 years ago