#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?s)^.*IP: (?!63\.3\.245\.123)(\d+.\d+.\d+.\d+).*$"
Local $sString = "The" & @CRLF & _
"Rest" & @CRLF & _
"of this code" & @CRLF & _
"is just HTML and stuffThe" & @CRLF & _
"Rest" & @CRLF & _
"of this code" & @CRLF & _
"is just HTML and stuff" & @CRLF & _
" " & @CRLF & _
"" & @CRLF & _
" Edit Ticket Post " & @CRLF & _
"E-mail: customeremail@ip.com IP: 98.154.227.123" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"The" & @CRLF & _
"Rest" & @CRLF & _
"of this code" & @CRLF & _
"is just HTML and stuffThe" & @CRLF & _
"Rest" & @CRLF & _
"of this code" & @CRLF & _
"is just HTML and stuff" & @CRLF & _
"" & @CRLF & _
"Regards," & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
" Edit Ticket Post " & @CRLF & _
"E-mail: myemail@google.com IP: 63.3.245.123" & @CRLF & _
"The" & @CRLF & _
"Rest" & @CRLF & _
"of this code" & @CRLF & _
"is just HTML and stuffThe" & @CRLF & _
"Rest" & @CRLF & _
"of this code" & @CRLF & _
"is just HTML and stuff"
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