#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^([+-]?\d*((([02468][048]|[13579][26]|\d\d(?!00))([02468][048]|[13579][26]))|\d{4}(?!-02-29|-366))-((?!02-3|(0[469]|11)-31|000)((0[1-9]|1[012])-(0[1-9]|[12]\d|30|31)|([012]\d\d|3([0-5]\d|6[0-6])))|(W(?!00)([0-4]\d|51|52)-[1-7]))|((\+?\d*([02468][048]|[13579][26])|-\d*([02468][159]|[13579][37]))(04|09|15|20|26|32|37|43|48|54|60|65|71|76|82|88|93|99)|(\+?\d*([02468][159]|[13579][37])|-\d*([02468][26]|[13579][048]))(05|11|16|22|28|33|39|44|50|56|61|67|72|78|84|89|95)|(\+?\d*([02468][26]|[13579][048])|-\d*([02468][37]|[13579][159]))(01|07|12|18|24|29|35|40|46|52|57|63|68|74|80|85|91|96)|\+?\d*(([02468][37]|[13579][159])(03|14|20|25|31|36|42|53|59|64|70|76|81|87|92|[049]8))|-\d*(([02468][048]|[13579][26])([059]2|08|13|19|24|30|36|41|47|58|64|69|75|80|86|97)))-W53-[1-7])$"
Local $sString = "2015-08-10" & @CRLF & _
"2015-10-08" & @CRLF & _
"12015-08-10" & @CRLF & _
"-2015-08-10" & @CRLF & _
"+2015-08-10" & @CRLF & _
"0015-08-10" & @CRLF & _
"1582-10-10" & @CRLF & _
"2015-02-28" & @CRLF & _
"2016-02-29" & @CRLF & _
"2000-02-29" & @CRLF & _
"0000-02-29" & @CRLF & _
"-2000-02-29" & @CRLF & _
"-2016-02-29" & @CRLF & _
"200000-02-29" & @CRLF & _
"2016-366" & @CRLF & _
"2000-366" & @CRLF & _
"0000-366" & @CRLF & _
"-2016-366" & @CRLF & _
"-2000-366" & @CRLF & _
"2015-081" & @CRLF & _
"2015-W33-1" & @CRLF & _
"2015-W53-7" & @CRLF & _
" 2015-08-10 " & @CRLF & _
""
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; Present the entire match result
_ArrayDisplay($aArray, "Result")
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm