In this scenario i need to get the latest response from the mail body by excluding the table

I need to get the latest response from mail body by excluding the headers . i tried regex to extract the response alone but it is extracting the table as well

@sathish_moorthy

Did you happen to check by getting the bodyashtml from get mail?

Cheers

Hi @sathish_moorthy

Check if any of these approaches will help

If the table is in specific format - Try to read the body of the email in plain text and see if the string operations could help to get the required value

Example - value between Header1 and Header 2 etc.

Hi @sathish_moorthy

Please check out for this solution

Hope this helps!

Im able to get table now.but there is another scenerio where i need content in the body by excluding the table. i tried regex everything but the table is also coming.

Hi all kindly help on this scenario

@sathish_moorthy

Generally in html body you would have table between table tag…soreplace the data between the table tag and you should be able to get the remaining data as you need

Rgeex fir replace can be like this

"(?=\<table\>).*(?>\</table\>)"

Make sure regexoptions.singleline is selected

Cheers

can you provide the full regex expression

@sathish_moorthy

System.Text.RegularExpressions.Regex.Replace(stringvariable,"(?=\<table\>).*(?>\</table\>)","",regexOptions.Singleline)

Cheers

the table is still coming

@sathish_moorthy

This does not look like bodyashtml

You need to get html body jot as text

Cheers