Hello,
How can i remove html codes in my output when i retrieve data from my email.
Thank you
I browse your suggestion but I didn’t get the solution as I am using IMAP not outlook activity, so can me suggest me more.
Thank you
Have you tried the last one?
Try this one
Thanks,
Prankur
Why is it not working in my case? I have tried same contain and its not working in my case.
What is the issue it is showing? Also I am assuming that SenderBody is a String variable.
Can you try to have one regex variable and initialize it
regex = new System.Text.RegularExpressions.Regex
Then try to use your code
regex.Replace(SenderBody, "<.*?>", string.Empty)
Thanks,
Prankur
First Replace br , div , tr tags with Enviornment.Newline and then replace the string with Regex.Replace(msg.Body,“<.*?>”,string.Empty)…This gives the plain text in correct format.
What is variable type of regex, as it gives an error “Overload resolution failed because no accessible ‘New’ accepts this number of arguments”.
Variable type is mentioned in above post. Can you share your workflow?
Thanks,
Prankur
I got through the problem, thank you so much.
Thank you
Hi,
Id like to be able to get the text inside an html element.
So go through the body find all text inside the ‘pre’ tag and save it in a string.
Hey Karthick,
Can you share with me an example .xaml for replacing div break and tr tags?
Hi Kuenzang,
please let me know as to how did that work…!im not able to resolve it:confused:
hey @AnithaH
use this within assign activity.
Convert.ToString(Regex.Replace(remove_html_string, “<[^>]+>| ”, string.Empty)).Replace(“​”,string.Empty).Replace(“v:* {behavior:url(default#VML);}”,string.Empty).Replace(“o:* {behavior:url(default#VML);}”,string.Empty).Replace(“w:* {behavior:url(default#VML);}”,string.empty).Replace(“.shape {behavior:url(default#VML);}”,string.Empty)
hey @Mr.StarLord_AO its working…Awesome…!!! Thanks much!
I didn t understand how can i use it in assign activity and how can i access the text of a specific balise
create a new string variable(new_mailBody) and assign the entire entire thing given below by replacing original_mailbody with mailmessage body.
thanks a lot , it works
Mr Star, works perfectly.
For some reason the other solution proposed in the topics here, having to do with replace “br”, div and tr with environment.newlines completely didn’t work for me…