#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)\([0-9]{2}\) (?:9[0-9]{1}|[1-5]{1})[0-9]{3}-[0-9]{4}"
Local $sString = "(11) 33333321" & @CRLF & _
"(11) 8543-0897" & @CRLF & _
"(11) 99076-1345" & @CRLF & _
"(11) 9046 -1345" & @CRLF & _
"(11) 2450 -5678" & @CRLF & _
"(11) 9764-4356" & @CRLF & _
"(11) 99991111" & @CRLF & _
"(11) 58753201" & @CRLF & _
"(11) 67890431" & @CRLF & _
"(11) 999999999" & @CRLF & _
"(11) 78906542" & @CRLF & _
"(11) 83567031" & @CRLF & _
"(11) 09853212" & @CRLF & _
"(11) 45678901" & @CRLF & _
"(11) 23456790" & @CRLF & _
"(11) 4004-1000"
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