#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "=+|GOLIATH"
Local $sString = "=====================================================================================" & @CRLF & _
"GOLIATH" & @CRLF & _
"=====================================================================================" & @CRLF & _
"" & @CRLF & _
"*** GOLIATH BACKUP CHECK *** GOLIATH BACKUP CHECK *** GOLIATH BACKUP CHECK *** " & @CRLF & _
"" & @CRLF & _
"====]] GOLIATH Backup Check Results [[====" & @CRLF & _
"" & @CRLF & _
"--] Remote Reachability Test" & @CRLF & _
"" & @CRLF & _
"Pings were NOT successful to 172.16.158.1 from remote router uscmcraudfl04r." & @CRLF & _
"" & @CRLF & _
"USCMCRAUDFL04R#ping 172.16.158.1 source FastEthernet0" & @CRLF & _
"" & @CRLF & _
"Type escape sequence to abort." & @CRLF & _
"Sending 5, 100-byte ICMP Echos to 172.16.158.1, timeout is 2 seconds:" & @CRLF & _
"Packet sent with a source address of 172.16.112.1 " & @CRLF & _
"....." & @CRLF & _
"Success rate is 0 percent" & @CRLF & _
"" & @CRLF & _
"--] Backup Device Test" & @CRLF & _
"" & @CRLF & _
"GOLIATH did not detect any backup devices connected to the router." & @CRLF & _
"" & @CRLF & _
"--] Back-to-Back Test" & @CRLF & _
"" & @CRLF & _
"No SMARTS Back-to-Back connections detected." & @CRLF & _
"" & @CRLF & _
"GOLIATH did not detect any iBGP connections for this device." & @CRLF & _
"" & @CRLF & _
"--] ISDN Test" & @CRLF & _
"" & @CRLF & _
"No ISDN interfaces detected on router or B2B routers." & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"====================================================================================="
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