Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This code will strip a string of all Html tags and replace a tag with a blank space (You can alternatively replace it with String.Empty but this often leads to words being joined).
using System.Text.RegularExpressions;
const string PATTERNHTML = "<.*?>";
static string StripHTML (string inputString)
{
return Regex.Replace(inputString, PATTERNHTML, " ");
}