#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)0([7,8,9])([0,1])\d{8}$|234([7,8,9])([0,1])\d{8}$"
Local $sString = "08062242801" & @CRLF & _
"+2340862242901" & @CRLF & _
"6754" & @CRLF & _
"2340862242901" & @CRLF & _
"+2348062242901" & @CRLF & _
"2349162242901" & @CRLF & _
"18062242901" & @CRLF & _
"08062242801" & @CRLF & _
"08262242801" & @CRLF & _
"08162242801" & @CRLF & _
"08562242801" & @CRLF & _
"080622428011" & @CRLF & _
"09162242801" & @CRLF & _
"07262242801" & @CRLF & _
"07062242801" & @CRLF & _
"09262242801" & @CRLF & _
"07562242801" & @CRLF & _
"06062242801" & @CRLF & _
"+2344045751111"
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