#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m).*\s(\d{11}|\d{5}\s\d{3}\s\d{3}|\d{5}\s\d{6}|\d{14}|\+\d{12}|\+\d{3}\s\d{3}\s\d{3}\s\d{3}|\d{4}\s\d{3}\s\d{3})\s.*"
Local $sString = "fdsgf dsgfd ggfs s 07123452670 ar gs fgsdf gsdf" & @CRLF & _
"t hth rt hrth rth 07812 345 931 tr yrt rty " & @CRLF & _
"try erty tr ytr y 07412 123466 tr yert y" & @CRLF & _
"tery ert y 00447912345188 etry ert y" & @CRLF & _
"tery etr yrt yret +971557017442 ert yert yrety " & @CRLF & _
"et yetr yertytr ety ert y +971 557 856 832 etry rt ytr y" & @CRLF & _
"etr yerty etry erty 0414 934 993 erty etry etry"
Local $sSubst = "$1"
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
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