I see the pattern of paragraph. If that’s going to work for you, you can split the whole string with newline character and get the index 1 value as mail body.
Expected output:
To whom it may be concern I wrote this email with a bleeding heart since I had no agreement about taking a life policy since I had with other company and I told your sales brocker I don’t need this police since I don’t understand about it and a premium is too much for me and I met him it was decreasing policies not pomp me with life cover and I tried to write to you guys and tell you about how I feel about this policy and I don’t need it I want to cancelled it and the 2nd one your sales brocker found out that you were still taking stop orders on my behalf of my father who passed and you paid it so I request this for the last if I don’t get help I will go through to found help out bodies to help really I’m so disappointed with your company that took my money that will help my kinds since I am a single parent I will attach my WhatsApp chat with your sales brocker that from day I didn’t want this policy I even don’t know how is working who in that policy please don’t send me any agreement policy policy because I don’t want it and need to cancel with immediately effect.
From unhappy customer. Shoba NA
Give this regex a try:
System.Text.RegularExpressions.Regex.Match(yourVariable, “(?<=attachments!\s)(.?)(?=\sYahoo mail: Search, organize, conquer)”, RegexOptions.Singleline).Value
In it I want to remove the part highlighted down below the email body from : “The ..llard Insurance company” until emaildisclamer.pdf.
Please help with a regex for this
text = fullTextVariable ’ (Your input text from email or source)
pattern = “To whom it may be concern.?From unhappy .?customer. Shoba NA”
extractedBody = System.Text.RegularExpressions.Regex.Match(text, pattern, System.Text.RegularExpressions.RegexOptions.Singleline).Value