#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mi)^((401178|401179|431274|438935|451416|457393|457631|457632|504175|627780|636297|636369|(506699|5067[0-6]\d|50677[0-8])|(50900\d|5090[1-9]\d|509[1-9]\d{2})|65003[1-3]|(65003[5-9]|65004\d|65005[0-1])|(65040[5-9]|6504[1-3]\d)|(65048[5-9]|65049\d|6505[0-2]\d|65053[0-8])|(65054[1-9]|6505[5-8]\d|65059[0-8])|(65070\d|65071[0-8])|65072[0-7]|(65090[1-9]|65091\d|650920)|(65165[2-9]|6516[6-7]\d)|(65500\d|65501\d)|(65502[1-9]|6550[3-4]\d|65505[0-8]))[0-9]{10,12})"
Local $sString = "5090402132456747" & @CRLF & _
"6500311231321321" & @CRLF & _
"6500321231321321" & @CRLF & _
"6500331231321321" & @CRLF & _
"6500341231321321" & @CRLF & _
"6500351231321321" & @CRLF & _
"6500391231321321" & @CRLF & _
"6500401231321321" & @CRLF & _
"6500451231564654" & @CRLF & _
"6500511231564654" & @CRLF & _
"6504051231321331" & @CRLF & _
"6504851231321321" & @CRLF & _
"6505411231321313" & @CRLF & _
"6507001321321313" & @CRLF & _
"6507201231321133" & @CRLF & _
"6509011235646432" & @CRLF & _
"5066998786245463" & @CRLF & _
"6516527887324132" & @CRLF & _
"6550007896242321" & @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