#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(\d){3}\.?\1{3}\.?\1{3}-?\1{2}"
Local $sString = "000.000.000-00" & @CRLF & _
"111.111.111-11" & @CRLF & _
"222.222.222-22" & @CRLF & _
"333.333.333-33" & @CRLF & _
"444.444.444-44" & @CRLF & _
"555.555.555-55" & @CRLF & _
"666.666.666-66" & @CRLF & _
"777.777.777-77" & @CRLF & _
"888.888.888-88" & @CRLF & _
"999.999.999-99" & @CRLF & _
"" & @CRLF & _
"00000000000" & @CRLF & _
"11111111111" & @CRLF & _
"22222222222" & @CRLF & _
"33333333333" & @CRLF & _
"44444444444" & @CRLF & _
"55555555555" & @CRLF & _
"66666666666" & @CRLF & _
"77777777777" & @CRLF & _
"88888888888" & @CRLF & _
"99999999999" & @CRLF & _
"99999999999"
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