#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mx)# The pattern should match twice or more." & @CRLF & _
"(?:" & @CRLF & _
" # Begin of line." & @CRLF & _
" ^" & @CRLF & _
" # But not one of these lines:" & @CRLF & _
" (?!(?:4-Diepi|5-Mts|.*\b(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\d{4}\b.*)$)" & @CRLF & _
" # Digits and then any chars not beeing line ending, followed by a new line or end of line." & @CRLF & _
" \d+[^\r\n]*(\R|$)" & @CRLF & _
"){2,}"
Local $sString = "Peie" & @CRLF & _
"71,176,953" & @CRLF & _
"T-re" & @CRLF & _
"71,173,557" & @CRLF & _
"5-Mts" & @CRLF & _
"41,653,495" & @CRLF & _
"45678" & @CRLF & _
"Sia" & @CRLF & _
"36,136,829" & @CRLF & _
"36,100,829" & @CRLF & _
"78,684,45" & @CRLF & _
"4-Diepi" & @CRLF & _
"120,829" & @CRLF & _
"uteCra" & @CRLF & _
"36,100" & @CRLF & _
"Oct2018" & @CRLF & _
"71,45,78" & @CRLF & _
"22 Apr2024" & @CRLF & _
"It should not match above." & @CRLF & _
"66456,56,6" & @CRLF & _
"9-inches" & @CRLF & _
"789,879,89" & @CRLF & _
"2-Mts"
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