#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)\b(?:(?:31(\/|-| |\.)(?:0?[13578]|1[02]|(?:Jan|January|Mar|March|May|Jul|July|Aug|August|Oct|October|Dec|December)))\1|(?:(?:29|30)(\/|-| |\.)(?:0?[1,3-9]|1[0-2]|(?:Jan|January|Mar|March|Apr|April|May|Jun|June|Jul|July|Aug|August|Sep|September|Oct|October|Nov|November|Dec|December))\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})\b|\b(?:29(\/|-| |\.)(?:0?2|(?:Feb|February))\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))\b|\b(?:0?[1-9]|1\d|2[0-8])(\/|-| |\.)(?:(?:0?[1-9]|(?:Jan|January|Feb|February|Mar|March|Apr|April|May|Jun|June|Jul|July|Aug|August|Sep|September))|(?:1[0-2]|(?:Oct|October|Nov|November|Dec|December)))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})\b"
Local $sString = "From 1 March 1960 To 1 March 2235" & @CRLF & _
"" & @CRLF & _
"For a period starting 01/03/1960 and ending 01/03/2235" & @CRLF & _
"" & @CRLF & _
"Starting 1.3.1960 and ending 1.3.2235" & @CRLF & _
"" & @CRLF & _
"For a period starting 1/3/1960 and ending 1/3/2235" & @CRLF & _
"From 1 June 1960 To 1 July 2235" & @CRLF & _
"From 1-June-1960 To 1-July-2235" & @CRLF & _
"" & @CRLF & _
"29-02-2008" & @CRLF & _
"29-Feb-2008" & @CRLF & _
"29-02-2009" & @CRLF & _
"29-Feb-2009" & @CRLF & _
"29/Feb/20" & @CRLF & _
"29-Feb-21" & @CRLF & _
"" & @CRLF & _
"29-10-2008" & @CRLF & _
"31-12-2008" & @CRLF & _
"31-11-2008" & @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