- 浏览: 135105 次
- 性别:
- 来自: 杭州
文章分类
最新评论
-
jacks808:
注意关闭相应的流......
Tomcat6下Log4j的log4j:ERROR Failed to rename错误解决办法 -
jacks808:
windows的默认磁盘扇区大小是4kb所以 建议把copy的 ...
Tomcat6下Log4j的log4j:ERROR Failed to rename错误解决办法 -
hnwangdan:
如何 保存treeview 的节点值呢?
build yui treeview by json -
lovepoem:
我刚好遇到需要在ubuntu10。04下面安装vss客户端的问 ...
Ubuntu下使用vss缺少'MFC42.dbg'解决办法 -
podormeijia:
配置不错,不过人不是很厚道,还要写个名字。不过不是很难找了,大 ...
自定义Eclipse颜色(黑板)
Eclipse 正则表达式 插件
http://myregexp.com/eclipsePlugin.html
http://www.brosinski.com/regex/
源码
匹配一:
结果一:
匹配二:
结果二:
http://myregexp.com/eclipsePlugin.html
http://www.brosinski.com/regex/
源码
<tr valign="middle" class="sptr1"> <td width="51" align="center" height="21" style="word-break:break-all"> 524348</td> <td width="87" align="center" style="word-break:break-all">你说(抢先听)</td> <td width="46" align="center"> 正常</td> <td width="46" align="center"> <img src="image_zh/huobi.gif">2.00</td> <td width="46" align="center"> --</td> <td width="66" align="center"> 2008-10-09</td> <td width="41" align="center"> 13</td> <td width="30" align="center"><a href="javascript:splisten('WEB','http://211.137.79.172:8080/colorring/al/617/524/0/0000/0000/348.wav','524348','xOPLtaOox8DPyMz9o6k=')"><img src="image/lingsheng.gif" width="18" height="17" border="0"></a></td> <td width="31" align="center"><a href="javascript:splisten('AIP','http://211.137.79.172:8080/colorring/rl/617/524/0/0000/0000/348.wav','524348','xOPLtaOox8DPyMz9o6k=')"><img src="image/lingyinshiting.gif" width="18" height="17" border="0"></a></td> <td width="31" align="center"><a href="javascript:submitform('spqueryselftoneinfo.screen?index=0')"><img src="image/forbutton/xiugaiicon.gif" width="12" height="14" border="0"></a></td> <td width="41" align="center"><a href="javascript:seturltext('deletetone.screen?info=0')"><img src="image/forbutton/shanchuicon.gif" width="12" height="14" border="0"></a></td> <td align="center" valign="middle"> <a href="hideorresumetone.do?resourceID=94683&operateType=1&resourceType=1"><img src="image/forbutton/yincang.gif" width="12" height="14" border="0" title="隐藏铃音"></a> </td> <td width="31" align="center"> <a href="javascript:submitform('uploadshocktone.screen?index=0')"><img src="image_zh/xiazai.gif" width="18" height="17" border="0"></a> </td> </tr>
匹配一:
<td[^>]*>(?: |\s|<img\b[^>]*>)*(?=((?:(?!<\/td>)[\s\S])+))\1<\/td>
结果一:
Found 13 match(es): start=50, end=138 Group(0) = <td width="51" align="center" height="21" style="word-break:break-all"> 524348</td> Group(1) = 524348 start=151, end=222 Group(0) = <td width="87" align="center" style="word-break:break-all">你说(抢先听)</td> Group(1) = 你说(抢先听) start=235, end=278 Group(0) = <td width="46" align="center"> 正常</td> Group(1) = 正常 start=291, end=366 Group(0) = <td width="46" align="center"> <img src="image_zh/huobi.gif">2.00</td> Group(1) = 2.00 start=372, end=415 Group(0) = <td width="46" align="center"> --</td> Group(1) = -- start=435, end=486 Group(0) = <td width="66" align="center"> 2008-10-09</td> Group(1) = 2008-10-09 start=501, end=544 Group(0) = <td width="41" align="center"> 13</td> Group(1) = 13 start=564, end=807 Group(0) = <td width="30" align="center"><a href="javascript:splisten('WEB','http://211.137.79.172:8080/colorring/al/617/524/0/0000/0000/348.wav','524348','xOPLtaOox8DPyMz9o6k=')"><img src="image/lingsheng.gif" width="18" height="17" border="0"></a></td> Group(1) = <a href="javascript:splisten('WEB','http://211.137.79.172:8080/colorring/al/617/524/0/0000/0000/348.wav','524348','xOPLtaOox8DPyMz9o6k=')"><img src="image/lingsheng.gif" width="18" height="17" border="0"></a> start=820, end=1068 Group(0) = <td width="31" align="center"><a href="javascript:splisten('AIP','http://211.137.79.172:8080/colorring/rl/617/524/0/0000/0000/348.wav','524348','xOPLtaOox8DPyMz9o6k=')"><img src="image/lingyinshiting.gif" width="18" height="17" border="0"></a></td> Group(1) = <a href="javascript:splisten('AIP','http://211.137.79.172:8080/colorring/rl/617/524/0/0000/0000/348.wav','524348','xOPLtaOox8DPyMz9o6k=')"><img src="image/lingyinshiting.gif" width="18" height="17" border="0"></a> start=1081, end=1266 Group(0) = <td width="31" align="center"><a href="javascript:submitform('spqueryselftoneinfo.screen?index=0')"><img src="image/forbutton/xiugaiicon.gif" width="12" height="14" border="0"></a></td> Group(1) = <a href="javascript:submitform('spqueryselftoneinfo.screen?index=0')"><img src="image/forbutton/xiugaiicon.gif" width="12" height="14" border="0"></a> start=1279, end=1455 Group(0) = <td width="41" align="center"><a href="javascript:seturltext('deletetone.screen?info=0')"><img src="image/forbutton/shanchuicon.gif" width="12" height="14" border="0"></a></td> Group(1) = <a href="javascript:seturltext('deletetone.screen?info=0')"><img src="image/forbutton/shanchuicon.gif" width="12" height="14" border="0"></a> start=1468, end=1711 Group(0) = <td align="center" valign="middle"> <a href="hideorresumetone.do?resourceID=94683&operateType=1&resourceType=1"><img src="image/forbutton/yincang.gif" width="12" height="14" border="0" title="隐藏铃音"></a> </td> Group(1) = <a href="hideorresumetone.do?resourceID=94683&operateType=1&resourceType=1"><img src="image/forbutton/yincang.gif" width="12" height="14" border="0" title="隐藏铃音"></a> start=1728, end=1914 Group(0) = <td width="31" align="center"> <a href="javascript:submitform('uploadshocktone.screen?index=0')"><img src="image_zh/xiazai.gif" width="18" height="17" border="0"></a> </td> Group(1) = <a href="javascript:submitform('uploadshocktone.screen?index=0')"><img src="image_zh/xiazai.gif" width="18" height="17" border="0"></a>
匹配二:
<td[^>]*>(?: |\s|<img\b[^>]*>)*([\s\S]+?)<\/td>
结果二:
Found 13 match(es): start=50, end=138 Group(0) = <td width="51" align="center" height="21" style="word-break:break-all"> 524348</td> Group(1) = 524348 start=151, end=222 Group(0) = <td width="87" align="center" style="word-break:break-all">你说(抢先听)</td> Group(1) = 你说(抢先听) start=235, end=278 Group(0) = <td width="46" align="center"> 正常</td> Group(1) = 正常 start=291, end=366 Group(0) = <td width="46" align="center"> <img src="image_zh/huobi.gif">2.00</td> Group(1) = 2.00 start=372, end=415 Group(0) = <td width="46" align="center"> --</td> Group(1) = -- start=435, end=486 Group(0) = <td width="66" align="center"> 2008-10-09</td> Group(1) = 2008-10-09 start=501, end=544 Group(0) = <td width="41" align="center"> 13</td> Group(1) = 13 start=564, end=807 Group(0) = <td width="30" align="center"><a href="javascript:splisten('WEB','http://211.137.79.172:8080/colorring/al/617/524/0/0000/0000/348.wav','524348','xOPLtaOox8DPyMz9o6k=')"><img src="image/lingsheng.gif" width="18" height="17" border="0"></a></td> Group(1) = <a href="javascript:splisten('WEB','http://211.137.79.172:8080/colorring/al/617/524/0/0000/0000/348.wav','524348','xOPLtaOox8DPyMz9o6k=')"><img src="image/lingsheng.gif" width="18" height="17" border="0"></a> start=820, end=1068 Group(0) = <td width="31" align="center"><a href="javascript:splisten('AIP','http://211.137.79.172:8080/colorring/rl/617/524/0/0000/0000/348.wav','524348','xOPLtaOox8DPyMz9o6k=')"><img src="image/lingyinshiting.gif" width="18" height="17" border="0"></a></td> Group(1) = <a href="javascript:splisten('AIP','http://211.137.79.172:8080/colorring/rl/617/524/0/0000/0000/348.wav','524348','xOPLtaOox8DPyMz9o6k=')"><img src="image/lingyinshiting.gif" width="18" height="17" border="0"></a> start=1081, end=1266 Group(0) = <td width="31" align="center"><a href="javascript:submitform('spqueryselftoneinfo.screen?index=0')"><img src="image/forbutton/xiugaiicon.gif" width="12" height="14" border="0"></a></td> Group(1) = <a href="javascript:submitform('spqueryselftoneinfo.screen?index=0')"><img src="image/forbutton/xiugaiicon.gif" width="12" height="14" border="0"></a> start=1279, end=1455 Group(0) = <td width="41" align="center"><a href="javascript:seturltext('deletetone.screen?info=0')"><img src="image/forbutton/shanchuicon.gif" width="12" height="14" border="0"></a></td> Group(1) = <a href="javascript:seturltext('deletetone.screen?info=0')"><img src="image/forbutton/shanchuicon.gif" width="12" height="14" border="0"></a> start=1468, end=1711 Group(0) = <td align="center" valign="middle"> <a href="hideorresumetone.do?resourceID=94683&operateType=1&resourceType=1"><img src="image/forbutton/yincang.gif" width="12" height="14" border="0" title="隐藏铃音"></a> </td> Group(1) = <a href="hideorresumetone.do?resourceID=94683&operateType=1&resourceType=1"><img src="image/forbutton/yincang.gif" width="12" height="14" border="0" title="隐藏铃音"></a> start=1728, end=1914 Group(0) = <td width="31" align="center"> <a href="javascript:submitform('uploadshocktone.screen?index=0')"><img src="image_zh/xiazai.gif" width="18" height="17" border="0"></a> </td> Group(1) = <a href="javascript:submitform('uploadshocktone.screen?index=0')"><img src="image_zh/xiazai.gif" width="18" height="17" border="0"></a>
发表评论
-
浅淡HBase的ACID
2013-04-23 17:20 2874http://archfan.sinaapp.com/2012 ... -
activemq 性能优化
2011-05-03 10:03 2492activemq How to configure Acti ... -
svn config
2010-11-11 15:09 2311引用 ### This file configures var ... -
eclipse java 视图的好处
2010-07-12 12:04 1596Hide jars from Project Explorer ... -
Trustno1回贴:晒晒自己这学期课程..有更强大的也晒晒吧..
2010-04-29 15:39 1298WindowXP 写道 有誰能說說綫數 怎麽學? 高 ... -
华硕(asus)笔记本m50vn在ubuntu下配置fn+a快捷键
2009-12-29 09:47 2642华硕笔记本装了ubuntu以后屏幕亮度会偏暗,即使fn+f6调 ... -
ubuntu下eclipse ctrl+k快捷键冲突
2009-10-10 17:37 1908eclipse的快捷键ctrl+k(向下搜索鼠标选中的文字)不 ... -
css hack 下划线 星号
2009-09-07 11:11 2563IE6识别*和_, 不识别 !important IE7识别* ... -
回复: 大数据量导出Excel的方案
2009-07-17 15:24 2027http://www.iteye.com/post/10857 ... -
Spring Security Multi login page setting
2009-05-26 15:30 2513<?xml version="1.0" ... -
spring security 登录请求获取附加参数
2009-05-26 15:16 1884http://forum.springsource.org/s ... -
spring security中自定义authenticationProcessingFilter
2009-05-26 15:06 4557http://hszdz.iteye.com/blog/337 ... -
spring security添加验证码处理
2009-05-26 15:00 4994public class CustomAuthenticati ... -
回复: 女生学计算机 路在何方
2009-04-22 21:03 832daquan198163 写道引用培养兴趣 优于 勤奋刻苦 ... -
华硕(ASUS)M50S81VN-SL外接 Dell 2209wa出现水波纹
2009-04-12 13:58 1849原因: http://we.pcinlife.com/thre ... -
对和服的愤怒很愚蠢
2009-03-30 12:30 844ozzzzzz 写道和服不管怎 ... -
华硕笔记本 M50VN XP 驱动
2009-03-22 15:26 2492转自 : http://www.gscwl.cn/ ... -
解决Intel HD Audio Controller声卡问题
2009-03-06 22:15 2526解决Intel HD Audio Controller ... -
struts2 covention plugin startup log
2009-03-02 15:29 1493[main] DEBUG org.apache.struts2 ... -
struts2.X与spring集成
2008-12-30 15:51 1131转自:struts2.与spring集成 1.将struts ...
相关推荐
js正则匹配table tr
主要介绍了js正则匹配table,img及去除各种标签问题,需要的朋友可以参考下
本文实例讲述了php正则匹配html中带class的div并选取其中内容的方法。分享给大家供大家参考。具体分析如下: 先看一段html代码: 复制代码 代码如下:”chartInfo”> ”line”> ”tideTable”> 潮汐表数据...
2.21 把部分的正则匹配添加到替代文本中 2.22 把匹配上下文插入到替代文本中 第3章 使用正则表达式编程 3.1 在源代码中使用字面正则表达式 3.2 导入正则表达式函数库 3.3 创建正则表达式对象 3.4 设置正则...
2.21 把部分的正则匹配添加到替代文本中 2.22 把匹配上下文插入到替代文本中 第3章 使用正则表达式编程 3.1 在源代码中使用字面正则表达式 3.2 导入正则表达式函数库 3.3 创建正则表达式对象 3.4 设置正则表达式选项...
正则匹配价格... 9 身份证号码的匹配... 10 要求文本有指定行数... 10 单词首字母大写... 10 正则验证日期格式... 11 去掉文件的后缀名... 12 验证邮箱的正则表达式... 12 匹配源代码中的链接... 13 匹配链接的文字....
看过许多UBB代码,包括JS,ASP,JSP的,一直没发现表格的UBB,虽然可以直接用HTML模式实现相同表格功能...其实我遇到的关键问题在于我不会写 不包含某个单词或语句(非单字符)的正则 ,譬如下面标记 QUOTE: [TABLE]
不过我要面对的是一个很松散的HTML页面,无法XML 因此,本文的重点在于如果要获取的网页中有Table或List段落,需要将这些段落的信息按照列的方式保存到JS的数组中 直接贴代码: 代码如下: var str = “字符串字符串...
收集常用的正则,大概有3000个 tExpression tDESCRIPTION matchs ((19|20)[0-9]{2})-(([1-9])|(0[1-9])|(1[0-2]))-((3[0-1])|([0-2][0-9])|([0-9])) Validate the year month and day. 2008-12-15 ^1+0+$ A simple ...
代码如下: <table> <tr><td>aaaa</td></tr> <tr><td>bbbb</td></tr> <tr><td>cccc</td></tr> <tr><td>dddd</td></tr> </table> 像这种的文本,用PHP的正则表达式怎么匹配?? 我最初的想法: pattern:”/[.\n]*?<...
代码如下:Update dede_addonsoft SET dxylink=REPLACE(dxylink, ‘.zip’, ‘.rar... :正则匹配,把field字段里的 .rar 替换为 .7z MySQL正则表达式替换,字符替换方法 两句SQL,都是字符替换,比较好用。 update com
要读懂这篇文章的精髓,你最好要有一点正则匹配原理的基础。比如”.*?”匹配文本内容”asp163″,稍懂正则表达式的人都知道可以匹配,但是你知道他的匹配过程吗?如果你不太清楚,那么下面的内容,对你来说可能不太...
找到您的家庭辅助配置目录(例如~/.homeassistant/ ),然后更改为~/.homeassistant/www (如果需要,请创建) 运行$ wget https://raw.githubusercontent.com/custom-cards/flex-table-card/master/flex-...
1、添加Behavior行为类增加路由正则匹配替换。 2、模型基类增加判断表名是否存在方法,使用方法:model('table_name')->tableExists(); 3、系统函数库新增正则表达式匹配验证提取网址URL并自动加上链接。 4、...
用正则匹配:找到第一个中括号部分,用第一个元素替换,然后找第二个,再替换 用sprintf函数:因为日期已经计算好,按照顺序替换就可以了. 因为markdown写正则比较麻烦,这里就直接上图片了 ps:设想一下,如sql中只有一个...
正则表达式(regular expression)描述了一种字符串匹配的模式(pattern),可以用来检查一个串是否含有某种子串、将匹配的子串替换或者从某个串中取出符合某个条件的子串等。 前端正则表达式书写 一.写法 写法一 /...
inc/regex.def :用于存储匹配项和子匹配项的TEMP-TABLE定义inc/regex.ds :保存临时表的DATASET定义inc/regex.i :可以包含在任何.p程序中,以增加对本机PCRE功能的支持; 使用PCRE库DLL或共享库lib/pcre3.dll :...
用的比较多的有xpath和正则匹配。一个完整的爬虫,代码量少则几十行,多则百来行,对于新手来说学习成本还是比较高的。 针对网页结构类似的表格类型数据,pd.read_html()可以将网页上的表格都抓取下来,并以...