/// <summary>
/// 方法接收一段HTML代码,返回一段代码
/// </summary>
/// <param name="strHtmlCode"></param>
/// <returns></returns>
public string replaceHtmlCode(string strHtmlCode)
{
string strCode = strHtmlCode.ToString();
if (strCode.ToString() == "")
{
return "";
}
else
{
strCode = strCode.Replace("<P>", "♂");
strCode = strCode.Replace("</P>", "♀");
strCode = strCode.Replace("<BR>", "¢");
Regex rgx = new Regex(@"<[^>]*>");
strCode = rgx.Replace(strCode.ToString(), "");
strCode = strCode.Replace("♂", "");
strCode = strCode.Replace("♀", "<BR>");
strCode = strCode.Replace("¢", "<BR>");
return strCode;
}
}