获取HTML表格内容
2009-05-07 11:10
309 查看
StringBuilder sb = new StringBuilder(256); MatchCollection mTr = Regex.Matches(yourStr, @"<tr[^>]*>(?:(?!</?tr>)[/s/S])*</tr>", RegexOptions.IgnoreCase); foreach (Match mr in mTr) { MatchCollection mTd = Regex.Matches(mr.Value, @"(?<=<td[^>]*>)[^>]*(?=</td>)", RegexOptions.IgnoreCase); foreach (Match md in mTd) { sb.AppendLine(md.Value); } } Console.WriteLine(sb.ToString()); Console.ReadKey();
相关文章推荐
- JS获取表格内指定单元格html内容的方法
- HTMLParseer 获取标签内容
- 如何在rdlc报表中获取文本框或某个表格单元格中的内容,报表中表达式的全局集合
- HTML怎么让table表格中的td单元格内容过长显示为固定长度,多余部分用省略号代替?
- text() or html() 获取 td 内容
- 富文本怎么只获取文字内容去除html标签
- 动态添加修改删除html表格内容
- python---get请求https的页面,并获取html返回的内容信息
- [置顶] php版的jQuery 向jQuery一样简单的获取html标签的内容
- RHEL5下ajax无法获取html内容的一种情况
- QTP获取动态表格内容
- 从富文本编辑器获取html内容组装json,特殊字符引起报错解决办法。
- php获取网页标题和内容函数(不包含html标签)
- 爬虫获取ajax异步请求的html内容
- JS编辑器获取选择内容的HTML多浏览器兼容性写法(支持Chorme、Firefox)
- fckeditor常用操作(包括获取表格内容和设置内容等)
- php正则表达式获取表格内容
- 正则表达式获取HTML标记中的内容(C#)
- JS获取word文档内容到html页面
- html 隐藏div HTML里隐藏表格TABLE或者DIV内容的css样式