public static String StripSpecificTag(string strVar, string tagName)
{
string retVal = strVar;
retVal = SanitizeEscapes(retVal);
if (FixNull(strVar) == string.Empty)
{
return (strVar);
}
else
{
//Regex tags = new Regex(@"<.*?" + tagName + ".*?>.*?<.*?/.*?" + tagName + ".*?>", RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace | RegexOptions.Singleline);
//retVal = tags.Replace(retVal, "");
Regex tags = new Regex(@"<[\s]*" + tagName + @".*?>", RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace | RegexOptions.Singleline);
retVal = tags.Replace(retVal, "");
tags = new Regex(@"<[\s]*/[\s]*?" + tagName + @".*?>", RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace | RegexOptions.Singleline);
retVal = tags.Replace(retVal, "");
return retVal;
}
}