I am currently working with email data and when extracting from Outlook, the body of the email still keeps all of the escape characters within the string.
I'm using the re
package in Python to achieve this, but to no avail.
Here's an example of text I'm trying to rid the escape characters from:
I am completely in agreement with that. \r\n\r\n\rbest regards.
Expected:
I'd like this to read: "I am completely in agreement with that. best regards.
I've tried the following to extract the unwanted text:
re.findall(r'\\\w+', string)
re.findall(r'\\*\w+', string)
re.findall(r'\\[a-z]+', string)
None of these are doing the trick. I'd appreciate any help!
Thanks!