#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(\w{3})(\w+)?(\w{3})"
Local $sString = "Hmm. We’re having trouble finding that site." & @CRLF & _
"" & @CRLF & _
"Check that Firefox has permission to access the web (you might be connected but behind a firewall)" & @CRLF & _
"" & @CRLF & _
"vamos fazer de conta que criamos um projeto de multipla escolha" & @CRLF & _
"" & @CRLF & _
"codigo-cliente-no-cadastro-unico" & @CRLF & _
"cxp-microintegration-teste-sistema-conta" & @CRLF & _
"testando-abreviação-simples-com-expressões-regulares" & @CRLF & _
"" & @CRLF & _
"Your account, a is not authorized to view this page. Make sure the URL is correct and your account has access."
Local $sSubst = "$1$3"
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