#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?s)(?<=From:)((?:(?!>).)*)>"
Local $sString = "From: FirstName LastName <FirstName.MiddleName.LastName@someemail.com>" & @CRLF & _
" In-Reply-To: <fc7b93ca4dab.531f4e68@my.bcit.ca>" & @CRLF & _
" ------------------------------------------------- " & @CRLF & _
" From: "FirstName. MiddleName =?iso-8859-1?b?TWFydO1uZXo=?= LastName"" & @CRLF & _
" <somemeail@something.otherthing.es> " & @CRLF & _
" Subject: Re: Some Randome Data " & @CRLF & _
" In-Reply-To: <42043F8EC804DB48A3C4AF477195328F272CB9@exchange.something.local>" & @CRLF & _
" ------------------------------------------------- " & @CRLF & _
" From: "FirstName MiddleName LastName" <LastName@someemail.com>" & @CRLF & _
" Subject: Some Randome Subject " & @CRLF & _
" -------------------------------------------------" & @CRLF & _
" From: "FirstName. MiddleName =?iso-8859-1?b?TWFydO1uZXo=?= LastName"" & @CRLF & _
" <somemeail@something.otherthing.es" & @CRLF & _
" > " & @CRLF & _
" Subject: Re: Some Randome Data " & @CRLF & _
" In-Reply-To: <42043F8EC804DB48A3C4AF477195328F272CB9@exchange.something.local>" & @CRLF & _
" ------------------------------------------------- " & @CRLF & _
" From: "FirstName. MiddleName =?iso-8859-1?b?TWFydO1uZXo=?= LastName"" & @CRLF & _
" <" & @CRLF & _
" somemeail@something.otherthing.es" & @CRLF & _
" > " & @CRLF & _
" Subject: Re: Some Randome Data " & @CRLF & _
" In-Reply-To: <42043F8EC804DB48A3C4AF477195328F272CB9@exchange.something.local>"
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