#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)\d{1,2}.\d{1,2}.20\d{2}"
Local $sString = "Example 1 (Colon)" & @CRLF & _
"Payee: John Smith" & @CRLF & _
"Account No: 145-567-981" & @CRLF & _
"Date: 19.01.2020" & @CRLF & _
"Time: 08:01" & @CRLF & _
"Email: JohnSmith@gmail.com" & @CRLF & _
"" & @CRLF & _
"Example 2 (the dash)" & @CRLF & _
"John Smith - Payee" & @CRLF & _
"145 567 981 - Account No" & @CRLF & _
"19-01-2020 - Date" & @CRLF & _
"08:01 - Time" & @CRLF & _
"John.Smith@hotmail.com - Email" & @CRLF & _
"" & @CRLF & _
"Example 3 (the dashes AND all one line of text)" & @CRLF & _
"Payee - John Smith - Account No - 145.567.9815 - Date - 19,1,2020 - Time - 08:01 - Email - John.Z.Smith@yahoo.com"
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