ebhb 发表于 2010-2-8 10:21:57

如何用正则表达式查找这种网页代码

方联系不如派出所紧密,那名警察就对http://www.hotsk.comhttp://www.hotsk.comhttp://www.hotsk.comhttp://www.hotsk.comhttp://www.hotsk.comhttp://www.hotsk.comhttp://www.hotsk.comhttp://www.hotsk.comhttp://www.hotsk.comhttp://www.hotsk.comhttp://www.hotsk.comhttp://www.hotsk.com/newdownphoto/Book/7070/091110115714740622.gif

    方官员并不客气,道:“你就在这站着,里面再勘察现场。”
将里面的http开头,到gif结束的代码去掉,谢谢各位老大。

sanmoking 发表于 2010-2-8 11:09:21

非正则的方法:[传送门]

ebhb 发表于 2010-2-8 11:25:10

用http*gif不行

水木子 发表于 2010-2-8 14:20:53

本帖最后由 水木子 于 2010-2-8 14:52 编辑

嘿嘿!传说论坛有位正则之神:face (20):

试试这样吧!$Text = 'http://www.hotsk.comhttp://www.hotsk.comhttp://www.h ... 110115714740622.gif'
$a = StringRegExpReplace($Text, 'http.*gif', "")
MsgBox(64, '', $a)
页: [1]
查看完整版本: 如何用正则表达式查找这种网页代码