Please Help With subject extract

Please help with extracting the subject line data from this:

I have used :

but it comes like this extracting the subject but still having this body text below:

here is the whole email
;

@Anelisa_Bolosha1

please try this

EmailBodyTrail.Split({"Subject:"},StringSplitOptions.None)(1).Trim.Split({Environment.Newline},StringSplitOptions.None)(0).Trim

Alternately use regex

System.Text.RegularExpressions.Regex.Match(EmailBodyTrail,"(?<=Subject\:).*",System.Text.RegularExpressions.RegexOptions.MultiLine).Value

cheers

2 Likes

This worked and helped a lot , I thank you for all your assistance.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.