I'm wondering how to remove any header of previous message in an email. There is an example of message:
Something above
-----Message d'origine-----
De : Myself <myself@himself.com>
Envoyé : vendredi 8 mars 2019 14:30
À : Someone <someone@himself.com>
Cc : AnotherGuy <another@himself.com>
Objet : My bad I forgot how to do it
Hi,
blabla
And I need to remove everything between -----Message d'origine-----
and the carriage return
and the empty new line
before "Hi,"
.
I've tried the following regex:
-----Message d'origine-----[\s\S]*?[\r\n]
But only -----Message d'origine-----
matched without the other lines below. However, if I use instead "Hi,"
, it matches all lines with it:
-----Message d'origine-----[\s\S]*?Hi
Is anyone can help me where is the problem and how to use instead the carriage return
and the empty new line
?
Thank you :)