#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^((0?[1-9]|[12][0-9]|3[01])(Jan|JAN|Mar|MAR|May|MAY|Jul|JUL|Aug|AUG|Oct|OCT|Dec|DEC)([0-9][0-9][0-9][0-9])|(0?[1-9]|[12][0-9]|30)(Apr|APR|Jun|JUN|Sep|SEP|Nov|NOV)([0-9][0-9][0-9][0-9])|(0?[1-9]|1[0-9]|2[0-8])(Feb|FEB)([0-9][0-9][0-9][0-9])|(29)(Feb|FEB)([0-9][0-9])([02468][048]|[13579][26]))$"
Local $sString = "1Jan2018 abcd" & @CRLF & _
"1Jan18" & @CRLF & _
"01Jan18" & @CRLF & _
"1Jan2018" & @CRLF & _
"01Jan2018" & @CRLF & _
"31Jan2018" & @CRLF & _
"31jan2018" & @CRLF & _
"31jAN2018" & @CRLF & _
"31JaN2018" & @CRLF & _
"31JAn2018" & @CRLF & _
"31JAN2018" & @CRLF & _
"28Feb2018" & @CRLF & _
"29Feb2018" & @CRLF & _
"29Feb2020" & @CRLF & _
"31Mar2018" & @CRLF & _
"30Apr2018" & @CRLF & _
"31Apr2018" & @CRLF & _
"31May2018" & @CRLF & _
"30Jun2018" & @CRLF & _
"31Jun2018" & @CRLF & _
"31Jul2018" & @CRLF & _
"31Aug2018" & @CRLF & _
"30Sep2018" & @CRLF & _
"31Sep2018" & @CRLF & _
"31Oct2018" & @CRLF & _
"30Nov2018" & @CRLF & _
"31Nov2018" & @CRLF & _
"31Dec2018"
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