#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)[0-9]{2}\/[0-9]{2}\/[0-9]{4}"
Local $sString = "Valid dates:" & @CRLF & _
"" & @CRLF & _
"01/04/2020" & @CRLF & _
"20/01/2019" & @CRLF & _
"25/12/1950" & @CRLF & _
"30/07/2021" & @CRLF & _
"31/08/1919" & @CRLF & _
"01/01/1729" & @CRLF & _
"10/05/2000" & @CRLF & _
"15/10/2049" & @CRLF & _
"" & @CRLF & _
"Invalid dates:" & @CRLF & _
"" & @CRLF & _
"001/04/1900" & @CRLF & _
"01/004/1900" & @CRLF & _
"90/04/1900" & @CRLF & _
"33/04/1900" & @CRLF & _
"01/13/1900" & @CRLF & _
"01/04/19000" & @CRLF & _
"00/04/1900" & @CRLF & _
"01/00/1900" & @CRLF & _
"1/4/00" & @CRLF & _
"1/04/1900" & @CRLF & _
"10/4/1900" & @CRLF & _
"10/04/00" & @CRLF & _
"///" & @CRLF & _
"/04/1900" & @CRLF & _
"01//1900" & @CRLF & _
"01/04/" & @CRLF & _
"01/04/1900" & @CRLF & _
"This is the date: 01/04/1900" & @CRLF & _
"01.04.1900" & @CRLF & _
"01-04-1900" & @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