Wednesday, July 23, 2008

Remove HTML string - tag from specified string

Remove HTML string - tag from specified string.
========================================

using System.Text.RegularExpressions;

public static string RemoveHtml(string strSource)
{

string pattern = @"<(.|\n)*?>";

strSource = Regex.Replace(strSource, pattern, string.Empty);


return strSource;
}

That's It !!
Hope you will like it.

No comments: