C# 过滤空格、换行、script、style等等标签
来源:互联网 发布:叉叉助手类似软件 编辑:程序博客网 时间:2024/06/05 17:29
/// <summary> /// 过滤空格、换行、script、style等等标签 /// </summary> /// <param name="html">html的内容</param> /// <returns>处理后的文本</returns> internal static string SHTML(string html) { html = html.Trim(); html = html.Replace(@"/<script[^>]*?>(.*?)<\/script>/si", ""); html = html.Replace(@"/<style[^>]*?>(.*?)<\/style>/si", ""); html = html.Replace("\t", ""); html = html.Replace("\r\n", ""); html = html.Replace("\r", ""); html = html.Replace("\n", ""); html = html.Replace(" ", ""); html = html.Replace(" ", ""); //html=html.Replace("",""); return html; }
0 0
- C# 过滤空格、换行、script、style等等标签
- php正则过滤html标签、空格、换行
- C#过滤换行符和多余空格
- php正则表达式过滤html标签、空格、换行符
- PHP正则过滤HTML标签、空格、换行符
- Java过滤任意(script,html,style)标签符,返回纯文本--封装类
- Java过滤任意(script,html,style)标签符,返回纯文本--封装类
- php 过滤换行及空格
- c# 过滤style
- java过滤html style script脚本
- ASP.NET过滤HTML标签只保留换行与空格的方法
- C#过滤Script脚本 过滤Html标记
- 删除string无用部分(空格,换行符,符号等等...)
- js 过滤script标签之间的内容
- //过滤文件中的所有标记和 script Style.
- Java 过滤 html、script、style 代码得到纯字符串 方法
- Java 过滤 html、script、style 代码得到纯字符串 方法
- C# 过滤html标签
- 黑马程序员——Java---io流--文本文件读取写入的实现
- 【郑轻】[1762]Dml‘s secret
- html学习第一天
- Universal-Image-Loader加载网络图片
- 线程---Thread
- C# 过滤空格、换行、script、style等等标签
- swift-基础08-隐式解析,隐式装包,强制装包和断言
- PHP实现mysql事务处理
- 一起talk C栗子吧(第七十九回:C语言实例--父进程与子进程)
- 正则表达式基本语法
- 谷歌浏览器使用
- 安卓天气应用
- 微软安卓模拟器(Visual Studio Emulator for Android)无法联网解决办法
- 二叉树非递归的操作