注册 登录
编程论坛 ASP技术论坛

asp 调用function没有用,求助!

a476552085 发布于 2012-02-16 09:00, 445 次点击
原代码:reg.Pattern="<a href=""../User(.*?)"">书架</a>"
Set objMatches = reg.Execute(book_chapter_data)
If objMatches.Count > 0 Then
link1="<a href=""../User"&objMatches(0).SubMatches(0)&""">书架</a>"
link2=""
book_chapter_data=replace(book_chapter_data,link1,link2)
End if
这样能将带连接的书架文字替换掉,但是我把他的方法写到function里面就替换不掉了,怎么解决?
这是function代码
function replink(link,link1,link2)
reg.Pattern=link
Set objMatches = reg.Execute(book_chapter_data)
If objMatches.Count > 0 Then
book_chapter_data=replace(book_chapter_data,link1,link2)
End if
call replink("<a href=""../User(.*?)"">书架</a>","<a href=""../User"&objMatches(0).SubMatches(0)&""">书架</a>","")
2 回复
#2
a4765520852012-02-16 20:41
没有人啊???
#3
wangzhao85502012-02-17 23:50
方法显式结束了吗?function ****() .... end function
1