Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

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

Description

Works with 2015-04-03T13:56:24.0+00:00 (official) format, and 2015-04-03T13:56:24+0000 (PHP) format, too Also: 2015-12-31

Submitted by Norbi - 5 years ago