01.<span style="white-space: pre;"> </span>/// <summary>
02. /// 过滤字符串中的html代码
03. /// </summary>
04. /// <param name="Str">传入字符串</param>
05. /// <returns>过滤后的字符串</returns>
06. public static string LostHTML(string Str)
07. {
08. string Re_Str = "";
09. if (Str != null)
10. {
11. if (Str != string.Empty)
12. {
13. string Pattern = "<\\/*[^<>]*>";
14. Re_Str = Regex.Replace(Str, Pattern, "");
15. }
16. }
17. return (Re_Str.Replace("\\r\\n", "")).Replace("\\r", "");
18. }