asp 调用function没有用,求助!
原代码: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>","")