Regular Expressions 101

Community Patterns

Community Library Entry

1

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}))?)?)?)?
/

Description

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

Submitted by Norbi - 10 years ago