RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details ISO 8601 (W3 subset)
Expression
^(\d{4}((-)?(0[1-9]|1[0-2])((-)?(0[1-9]|[1-2][0-9]|3[0-1])(T(24:00(:00(\.[0]+)?)?|(([0-1][0-9]|2[0-3])(:)[0-5][0-9])((:)[0-5][0-9](\.[\d]+)?)?)((\+|-)(14:00|(0[0-9]|1[0-3])(:)[0-5][0-9])|Z))?)?)?)$
Description
Matches all valid date/datetime strings according to the W3's implementation of ISO 8601, outlined here: http://www.w3.org/TR/NOTE-datetime
Matches
2008, 2004-04-14, 1997-01-27T18:57Z, 2010-11-21T08:12:17.243+07:00
Non-Matches
3:00, 2/28/2003, 2010-14-21T08:12:17.243+07:00
Author Rating: Not yet rated. Ryan Bies
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials