I'm trying to remove all sentences if they start with particular character until break line. So far I created something like this but it removes only these particular characters instead of whole line. I'm not good with regex expressions so would be grateful if someone could throw some hint
From: ABC, DEF <[email protected] [mailto:[email protected]]>
Upcoming Events:
Hello hello
Sent: Thursday, February 28, 20117:22 PM
var cleanup = msg.replace(/From.|Sent.|To.|Cc.*\n/g, "");
current output:
ABC, DEF <[email protected] [mailto:[email protected]]>
Upcoming Out of Office:
Hello hello
Thursday, July 29, 2021 7:48 PM
expected output:
Upcoming Out of Office:
Hello hello