#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)[\(+\/\\]?(\d[+\(\)\/\\ -]*){10,11}"
Local $sString = "Lorem /901/201-07-05 ipsum \901\201-07-05 dolor 89108002001 sit amet, consectetur 901 2010 705 adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim 901 201 07 05 ad minim veniam, +7 901-201-07-05 quis nostrud 901-201-07-05 exercitation ullamco (901)201-07-05 laboris nisi ut aliquip (901)201-07d-05 ex ea commodo consequat. " & @CRLF & _
"(901) 20107-05 Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 8 9 1 0 8 0 0 2 0 0 1 Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." & @CRLF & _
"" & @CRLF & _
"Lorem ipsum dolor 18. 89108002001 Lorem ipsum dolor 20.3??? 901 2010 705 Lorem 90 60 90 ipsum dolor (901) 865-3308 sit amet 90-60-90 ipsum dolor 90/60/90 Lorem ipsum: 90.60.90 dolor!"
Local $sSubst = "*** "
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