As you know the format is like:
\"YYYY-MM-DDTHH:NN:SS.ZZZ+XX:XX\" (i.e. \"2009-03-24T16:24:32.057+01:00\")
I have to do it in a ActionScript3
Following Regex is perfect for any UTC date formats
"^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\\.[0-9]+)?(Z)?$"
Ref: https://www.regexpal.com/94925
Regex should be something like this:
\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}\+\d{2}:\d{2}
Have a look at this related question:
Actionscript 3 - Fastest way to parse yyyy-mm-dd hh:mm:ss to a Date object?
The accepted answer provides a way to parse an UTC time string to a Date
object.
Java regex, tested to read a date like "2001-12-15T07:30:40Z"
:
"^\\d{4}-[0-1][0-3]-[0-3]\\d{1}T[0-2]\\d{1}:[0-5]\\d{1}:[0-5]\\d{1}Z$"
\d{4}-[0-1]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-6]\d.\d{3}\+\d\d:\d\d
Or something similar?
More checks of the valid range are probably better done after the reg.ex.