I have some sample data similar to the below.
From: JoeBloggs
Subject: This is a subject line
Hello
What I am looking to do is remove all of the data including the word 'From' until the final newline before 'Hello'. I would therefore need to look for two newline entries in sequence (I think). I could look to run a regex.match for 'From:' and then replace it but that would only replace the 'From:'. Is there anything I can do achieve this?
Using the 'repr' command with print, it displays as below:-
'From: JoeBloggs\nSubject: This is a subject line\n\nHello'
Therefore, I need to run a regex command to find the word 'From: ' all the way until the following '\n\n' and then replace everything in between.