返回列表 发帖

[问题]请问常规表示式匹对中文字元方法

我最近常常去一个Discuz!的论坛,
这个论坛会摆放两种广告,文字广告和图片广告..

我观察了他的原始码发现,这些广告都会用HTML注解标示起来:
  1. <!--圖檔廣告開始-->
  2. <center>
  3. <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="59" id="AutoNumber1">
  4.   <tr>
  5.     广告广告
  6.     </tr>
  7. </table>
  8. </center>
  9. <!--圖檔廣告結束-->

  10. <!--文字廣告開始-->
  11. <center>广告广告</center>
  12. <!--文字廣告結束-->
复制代码


所以我想要用常规表示式来匹配"<!--文字廣告開始-->"到
<!--文字廣告結束->",但是使用unicode无法比对到(该网页使用big5码),
请问有没有人可以帮忙?

终於找到问题了..
只是因为广告过滤规则教程有误...
教程中写的:
  1. #(type)#(restring)###(replace string)
复制代码
应该要改成
  1. #(type)#(url matching)#(restring)###(replace string)
复制代码


所以我的案子只要加入
  1. #exd#*forum*#廣告開始-->###following Ad removed
复制代码
就OK了

[ 本帖最后由 split 于 2007-7-31 20:57 编辑 ]

TOP

返回列表