#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^((\+\s*7)|(\s*8\s*\-*))(\)*\(*\-*\s*[0-9]\)*\(*\-*\s*){10}$"
Local $sString = "84951234567" & @CRLF & _
"+74951234567" & @CRLF & _
"8-495-1-234-567" & @CRLF & _
" 8 (8122) 56-56-56" & @CRLF & _
"8-911-1234567" & @CRLF & _
"8 (911) 12 345 67" & @CRLF & _
"8-911 12 345 67" & @CRLF & _
"8 (911) - 123 - 45 - 67" & @CRLF & _
"+ 7 999 123 4567" & @CRLF & _
"8 ( 999 ) 1234567" & @CRLF & _
"8 999 123 4567" & @CRLF & _
"02" & @CRLF & _
"84951234567 позвать люсю" & @CRLF & _
"849512345" & @CRLF & _
"849512345678" & @CRLF & _
"8 (409) 123-123-123" & @CRLF & _
"7900123467" & @CRLF & _
"5005005001" & @CRLF & _
"8888-8888-88" & @CRLF & _
"84951a234567" & @CRLF & _
"8495123456a" & @CRLF & _
"+1 234 5678901" & @CRLF & _
"+8 234 5678901" & @CRLF & _
"7 234 5678901"
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