#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(\((\d{3})\)|(\d{3}))[\s\-\.]?\d{3}[\s\-\.]?\d{4}"
Local $sString = "678 9o2 65o1" & @CRLF & _
"33 43 269413" & @CRLF & _
"(716)5 262238" & @CRLF & _
"(334)7 21-0630" & @CRLF & _
"256-462-6615" & @CRLF & _
"256 462 6615" & @CRLF & _
"72 47 36 7976" & @CRLF & _
"(681)2 433259" & @CRLF & _
"256-462-6615" & @CRLF & _
"7✴two✴0✴six✴four✴nine✴2✴zero✴7✴eight" & @CRLF & _
"(302)4 872364" & @CRLF & _
"" & @CRLF & _
"678 NO TROUBLE NO GAMES 964 RLEAXIN SPACE JUST TO GET AWAY Wettness your taste buds needs 0656" & @CRLF & _
"" & @CRLF & _
"2❤#TWO 0❤ZERO5 ❤FIVE 5❤FIVE 2❤TWO 6❤SIX 8❤EIGHTY 7❤SEVEN 1❤ONE SIX 6" & @CRLF & _
"" & @CRLF & _
"720/838/8032"
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