C#过滤Html标签及空格
1 public static string FilterHTML(string HTMLStr) 2 { 3 if (!string.IsNullOrEmpty(HTMLStr)) 4 return System.Text.RegularExpressions.Regex.Replace(HTMLStr, "<[^>]*>| ", ""); 5 else 6 return ""; 7 }
1 public static string FilterHTML(string HTMLStr) 2 { 3 if (!string.IsNullOrEmpty(HTMLStr)) 4 return System.Text.RegularExpressions.Regex.Replace(HTMLStr, "<[^>]*>| ", ""); 5 else 6 return ""; 7 }