This evening I created a project in C# that explains how to remove html tags from string with regular expressions.
I created a function to semplify this operation.
private string removeHmtlFromString(string strInput)
{
try
{
Regex objRegExp = new Regex("<(.|\n)+?>");
return objRegExp.Replace(strInput, String.Empty).Trim();
}
catch
{
return string.Empty;
}
}
You can download the full work project from this article.
RemoveHtmlFromString.rar (36.17 kb)