- UID
- 95060
- 帖子
- 3
- 精华
- 0
- 贡献
- 0
- 推广
- 0
- 有效BUG
- 0
- 注册时间
- 2008-2-28
|
本帖最后由 cjnt007 于 2009-9-13 17:55 编辑
我想将http://shehui.daqi.com/bbs/20/2690641.html这个页面上的框架代码去掉,改成自动跳转到被嵌套的页面,正则表达式在测试工具里测试工作正常,但编写成规则后加到黑名单里不能工作,敬请高手赐教!
这是框架页面代码- <html>
- <head>
- <title>中投英国第一单:看好地产前景还是“输血”花旗?_daqi.com--大旗网</title>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <meta name="keywords" content="中投英国第一单:看好地产前景还是“输血”花旗?">
- <meta name="description" content="中投英国第一单:看好地产前景还是“输血”花旗?">
- <script language="JavaScript">
- <!--
- document.domain = "daqi.com"; //指定 document 所属的域
- -->
- </script>
- <script language="javascript" src="http://www.daqi.com/total.js"></script>
- <script language="javascript">var dq_page_type=20; var dq_page_id=2690641; var dq_page_url='http%3A%2F%2Fwww.manguo.net%2Fthread-49625-1-1.html'; </script>
- <script language="javascript" src="http://www.daqi.com/clicklog.js"></script>
- <script language="javascript">var daqi_channel='DAQI_BAR';</script>
- <script language="javascript" src="http://www.daqi.com/channel_state.js"></script>
- </head>
- <frameset rows="*" cols="0,*" framespacing="0" frameborder="no" border="0">
- <FRAME src="" name="clicklog">
- <frameset rows="170,*" frameborder="NO" border="0" framespacing="0">
- <frame SRC="/searchbar/20/2690641.html" name="searchbar" scrolling="NO" noresize>
- <frame name="bbsurl" SRC="http://www.manguo.net/thread-49625-1-1.html">
- </frameset>
- </frameset>
- <noframes>
- <body>
- <p>中投英国第一单:看好地产前景还是“输血”花旗?</p>
- <p>http://www.manguo.net/thread-49625-1-1.html</p>
- </body>
- </noframes>
- </html>
复制代码 将上面18-36行代码通过正则表达式替换后生成的页面代码(新代码在下面第18行):- <html>
- <head>
- <title>中投英国第一单:看好地产前景还是“输血”花旗?_daqi.com--大旗网</title>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <meta name="keywords" content="中投英国第一单:看好地产前景还是“输血”花旗?">
- <meta name="description" content="中投英国第一单:看好地产前景还是“输血”花旗?">
- <script language="JavaScript">
- <!--
- document.domain = "daqi.com"; //指定 document 所属的域
- -->
- </script>
- <script language="javascript" src="http://www.daqi.com/total.js"></script>
- <script language="javascript">var dq_page_type=20; var dq_page_id=2690641; var dq_page_url='http%3A%2F%2Fwww.manguo.net%2Fthread-49625-1-1.html'; </script>
- <script language="javascript" src="http://www.daqi.com/clicklog.js"></script>
- <script language="javascript">var daqi_channel='DAQI_BAR';</script>
- <script language="javascript" src="http://www.daqi.com/channel_state.js"></script>
- <script>top.location.href="http://www.manguo.net/thread-49625-1-1.html"</script></head></html>
复制代码 这是我编写的规则:-
- #exd#*daqi.com/bbs*#<\/head>\s+(.*\s+){6}.*?name="bbsurl" SRC="(.*?)".*\s+(.*\s+){8}###<script>top.location.href="$2"</script></head>
复制代码 |
|