#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(\d{1,4})[\/|-|.\S](\d{1,2})[\/|-|.|\S](\d{1,4})[\T|\s](\d{1,2})[\:](\d{1,2})[\S|:](\d{2})?[\:|\s|.|Z]?(\d{7})?(?:AM)?(?:PM)?$"
Local $sString = "Validated" & @CRLF & _
"" & @CRLF & _
"01.10.2008 17:04" & @CRLF & _
"10/1/2008 5:04 AM" & @CRLF & _
"01/10/2008 17:04" & @CRLF & _
"01.10.2008 17:04:32" & @CRLF & _
"10/1/2008 5:04:32 PM" & @CRLF & _
"" & @CRLF & _
"2008-10-01T17:04:32.0000000" & @CRLF & _
"2008-10-01T17:04:32" & @CRLF & _
"2008-10-01 17:04:32Z" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Not Works!" & @CRLF & _
"01.10.2008 17:04 '" & @CRLF & _
"10/1/2008 5:04 PM '" & @CRLF & _
"01/10/2008 17:04 ' " & @CRLF & _
"01.10.2008 17:04:32 '" & @CRLF & _
"10/1/2008 5:04:32 PM '" & @CRLF & _
"" & @CRLF & _
"2008-10-01T17:04:32.0000000 '" & @CRLF & _
"2008-10-01T17:04:32 ' " & @CRLF & _
"2008-10-01 17:04:32Z '" & @CRLF & _
"" & @CRLF & _
"Validate!" & @CRLF & _
"01.10.2008 17:04" & @CRLF & _
"" & @CRLF & _
"10/1/2008 5:04 PM" & @CRLF & _
"01/10/2008 17:04" & @CRLF & _
"01.10.2008 17:04:32" & @CRLF & _
"10/1/2008 5:04:32 PM" & @CRLF & _
"" & @CRLF & _
"2008-10-01T17:04:32.0000000" & @CRLF & _
"2008-10-01T17:04:32" & @CRLF & _
"2008-10-01 17:04:32Z"
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