#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(?!.*(11|22|33|44|55|66|77|88|99|01|12|23|34|45|56|67|78|89|10|21|32|43|54|65|76|87|98))\d{4}$"
Local $sString = "1111" & @CRLF & _
"5555" & @CRLF & _
"" & @CRLF & _
"1234" & @CRLF & _
"7564" & @CRLF & _
"" & @CRLF & _
"1148" & @CRLF & _
"1559" & @CRLF & _
"1499" & @CRLF & _
"" & @CRLF & _
"1268" & @CRLF & _
"1569" & @CRLF & _
"1389" & @CRLF & _
"" & @CRLF & _
"9851" & @CRLF & _
"9651" & @CRLF & _
"9532" & @CRLF & _
"" & @CRLF & _
"1579" & @CRLF & _
"8264" & @CRLF & _
"1359" & @CRLF & _
"9461" & @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