I code therefore I am.

February 19, 2010 at 5:59pm
0 notes
Comments (View)
home

Tags:
CSharp,  format  regex  

Strip HTML Tags

using System.Text.RegularExpressions;
    ...
    public static string StripHTML(string htmlText)
    {
        return Regex.Replace(htmlText, "<(.|\n)*?>", "");
    }

blog comments powered by Disqus