#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)([(-.+]*+[0-9]+[()-.+ ]*+[0-9]+[()-.+ ]*+[0-9]+[()-.+ ]*+[0-9]+[()-.+ ]*+[0-9]+[()-.+ ]*+[0-9]+[()-.+ ]*+[0-9]+[()-.+ ]*+[0-9]*+[()-.+ ]*+[0-9]*+[()-.+ ]*+[0-9]*+[()-.+ ]*+[0-9]*+)"
Local $sString = "Lorem ipsum foo@bar.com dolor sit amet, 555 123555 consectetur adipiscing elit." & @CRLF & _
"Here (works) 0606060606 (not works) 06.06.06.0.06.06 06.06 ... .06.06.06 price is 20. 000.000" & @CRLF & _
"" & @CRLF & _
"555.123.4565" & @CRLF & _
"+1-(800)-545-2468" & @CRLF & _
"+ 1 -(800)-545-2468" & @CRLF & _
"2-(800)-545-2468" & @CRLF & _
"3-800-545-2468" & @CRLF & _
"555-123-3456" & @CRLF & _
"555 222 3342" & @CRLF & _
"(234) 234 2442" & @CRLF & _
"(243)-234-2342" & @CRLF & _
"1234567890" & @CRLF & _
"123.456.7890" & @CRLF & _
"123.4567" & @CRLF & _
"123-4567" & @CRLF & _
"1234567900" & @CRLF & _
"12345678900" & @CRLF & _
"+8.4.0.9.6.6.4.3.0.0.9" & @CRLF & _
"" & @CRLF & _
"my price is only 20$, 2000$"
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