Positive Lookahead(?=(?:^(?:\d\d\d\d-(?:0[1-9]|10|11|12)-(?:0[1-9]|1[0-9]|2[0-8])|\d\d\d\d-(?:0[13-9]|10|11|12)-(?:29|30)|\d\d\d\d-(?:0[13578]|10|12)-31|(?:\d\d[2468][048]|\d\d0[48]|\d\d[13579][26])-02-29|(?:[02468][048]00|[13579][26]00)-02-29)T(?:(?:0[0-9]|1[0-9]|2[0-3]):(?:[0-5][0-9]):(?:[0-5][0-9]))(?:\.\d\d\d)?(?:Z|[\+\-](?:0[0-9]|1[012]):00|\+0[34569]:30|\+10:30|-0[39]:30|\+1[34]:00|\+0[58]:45|\+12:45)$)|^(?:1972|198[1235]|199[2347]|2012|2015)-06-30T23:59:60Z$|^(?:197[2-9]|1987|1989|199[058]|2005|2008|2016)-12-31T23:59:60Z$) 1st Alternative(?:^(?:\d\d\d\d-(?:0[1-9]|10|11|12)-(?:0[1-9]|1[0-9]|2[0-8])|\d\d\d\d-(?:0[13-9]|10|11|12)-(?:29|30)|\d\d\d\d-(?:0[13578]|10|12)-31|(?:\d\d[2468][048]|\d\d0[48]|\d\d[13579][26])-02-29|(?:[02468][048]00|[13579][26]00)-02-29)T(?:(?:0[0-9]|1[0-9]|2[0-3]):(?:[0-5][0-9]):(?:[0-5][0-9]))(?:\.\d\d\d)?(?:Z|[\+\-](?:0[0-9]|1[012]):00|\+0[34569]:30|\+10:30|-0[39]:30|\+1[34]:00|\+0[58]:45|\+12:45)$) Non-Capturing Group(?:^(?:\d\d\d\d-(?:0[1-9]|10|11|12)-(?:0[1-9]|1[0-9]|2[0-8])|\d\d\d\d-(?:0[13-9]|10|11|12)-(?:29|30)|\d\d\d\d-(?:0[13578]|10|12)-31|(?:\d\d[2468][048]|\d\d0[48]|\d\d[13579][26])-02-29|(?:[02468][048]00|[13579][26]00)-02-29)T(?:(?:0[0-9]|1[0-9]|2[0-3]):(?:[0-5][0-9]):(?:[0-5][0-9]))(?:\.\d\d\d)?(?:Z|[\+\-](?:0[0-9]|1[012]):00|\+0[34569]:30|\+10:30|-0[39]:30|\+1[34]:00|\+0[58]:45|\+12:45)$) ^start of line
Non-Capturing Group(?:\d\d\d\d-(?:0[1-9]|10|11|12)-(?:0[1-9]|1[0-9]|2[0-8])|\d\d\d\d-(?:0[13-9]|10|11|12)-(?:29|30)|\d\d\d\d-(?:0[13578]|10|12)-31|(?:\d\d[2468][048]|\d\d0[48]|\d\d[13579][26])-02-29|(?:[02468][048]00|[13579][26]00)-02-29) 1st Alternative\d\d\d\d-(?:0[1-9]|10|11|12)-(?:0[1-9]|1[0-9]|2[0-8]) \da digit
\da digit
\da digit
\da digit
-the literal - (4510 / 558 / 2D16)
Non-Capturing Group(?:0[1-9]|10|11|12) 0the literal 0 (4810 / 608 / 3016)
1-9one character from 1 (4910) to 9 (5710)
-the literal - (4510 / 558 / 2D16)
Non-Capturing Group(?:0[1-9]|1[0-9]|2[0-8]) 0the literal 0 (4810 / 608 / 3016)
1-9one character from 1 (4910) to 9 (5710)
1the literal 1 (4910 / 618 / 3116)
0-9one character from 0 (4810) to 9 (5710)
2the literal 2 (5010 / 628 / 3216)
0-8one character from 0 (4810) to 8 (5610)
2nd Alternative\d\d\d\d-(?:0[13-9]|10|11|12)-(?:29|30) \da digit
\da digit
\da digit
\da digit
-the literal - (4510 / 558 / 2D16)
Non-Capturing Group(?:0[13-9]|10|11|12) 0the literal 0 (4810 / 608 / 3016)
1the literal 1 (4910 / 618 / 3116)
3-9one character from 3 (5110) to 9 (5710)
-the literal - (4510 / 558 / 2D16)
Non-Capturing Group(?:29|30) 3rd Alternative\d\d\d\d-(?:0[13578]|10|12)-31 4th Alternative(?:\d\d[2468][048]|\d\d0[48]|\d\d[13579][26])-02-29 5th Alternative(?:[02468][048]00|[13579][26]00)-02-29 Tthe literal T (8410 / 1248 / 5416) (case sensitive)
Non-Capturing Group(?:(?:0[0-9]|1[0-9]|2[0-3]):(?:[0-5][0-9]):(?:[0-5][0-9])) Non-Capturing Group(?:\.\d\d\d)? Non-Capturing Group(?:Z|[\+\-](?:0[0-9]|1[012]):00|\+0[34569]:30|\+10:30|-0[39]:30|\+1[34]:00|\+0[58]:45|\+12:45) $end of line
2nd Alternative^(?:1972|198[1235]|199[2347]|2012|2015)-06-30T23:59:60Z$ 3rd Alternative^(?:197[2-9]|1987|1989|199[058]|2005|2008|2016)-12-31T23:59:60Z$ Negative Lookahead(?!.*-00:00$) ^start of line
-the literal - (4510 / 558 / 2D16)
-the literal - (4510 / 558 / 2D16)
Tthe literal T (8410 / 1248 / 5416) (case sensitive)
:the literal : (5810 / 728 / 3A16)
:the literal : (5810 / 728 / 3A16)
Non-Capturing Group(?:\.(\d\d\d))? Group 8((Z)|([\+\-])(\d\d):(\d\d)) $end of line
g modifier: global. Finds all matches instead of stopping after the first
m modifier: multiline. Causes ^ and $ to match the start and end of each line, not only the start and end of the string