Remove the HTML tags from a string using Html Agility Pack

Topics: Developer Forum, User Forum
May 22, 2012 at 6:51 AM

I want to remove the html tags that are coming in a string. How can I do this by using HTML Agility Pack?

Jun 17, 2012 at 10:50 PM

Hello coder,
If you are using C#, here is a simple REGEX function that will do the job for what you are asking. 

private string StripTagsRegex(string source)
            return Regex.Replace(source, "<.*?>", string.Empty);

Kind Regards.