asp.ne去除html的函数代码
代码如下:
/// <summary> /// 过滤字符串中的html代码 /// </summary> /// <param name="Str"></param> /// <returns>返回过滤之后的字符串</returns> public static string LostHTML(string Str) { string Re_Str = ""; if (Str != null) { if (Str != string.Empty) { string Pattern = "<\\/*[^<>]*>"; Re_Str = Regex.Replace(Str, Pattern, ""); } } return (Re_Str.Replace("\\r\\n", "")).Replace("\\r", ""); }
相关推荐
stulen 2020-08-15
fengzhiwu 2020-08-01
liusarazhang 2020-06-28
xiaobaif 2020-06-14
lemonzhangyan 2020-06-13
Crazyshark 2020-06-13
weikaixxxxxx 2020-06-13
有梦就能实现 2020-06-10
shengnanonly 2020-06-03
oraclemch 2020-05-30
poplpsure 2020-05-27
fujuan000 2020-04-30
zuihaobushi 2020-04-30
luckymaoyy 2020-04-29
xiaoseyihe 2020-04-28
JackLang 2020-04-25
菇星獨行 2020-04-20
jyj00 2020-03-26