#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)-----Message d'origine-----.*(?:\r?\n(?!\r?\n).*)*\s*"
Local $sString = "Something above" & @CRLF & _
"" & @CRLF & _
"-----Message d'origine-----" & @CRLF & _
"De : Myself <myself@himself.com>" & @CRLF & _
"Envoyé : vendredi 8 mars 2019 14:30" & @CRLF & _
"À : Someone <someone@himself.com>" & @CRLF & _
"Cc : AnotherGuy <another@himself.com>" & @CRLF & _
"Objet : My bad I forgot how to do it" & @CRLF & _
"" & @CRLF & _
"Hi," & @CRLF & _
"" & @CRLF & _
"blabla"
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