Remove Html Tags from string

Ranjeet_8
Posted by Ranjeet_8 under ASP.NET category on | Points: 40 | Views : 1348

public static string StripTagsRegex(string source)
{
if (source == null)
source = "";
if (source != "")
return Regex.Replace(source, @"<(.|\n)*?>", string.Empty);
else
return source;
}

Comments or Responses

Login to post response