asp教程 獲取字符串中url地址函數
本文章提供了三款利用asp的正則獲取字符串中url地址自定義函數哦
on error goto z
dim url
url=request
if instr(url
key=split(url
wwwname=key(
wwwname=replace(wwwname
end if
response
方法二
public shared function isurl(byval strtmp as string) as boolean
on error goto z
dim objintpattern as new system
return objintpattern
z:
end function
private sub button
msgbox (isurl( "
方法三
dim objintpattern
isurl = false
set objintpattern = new regexp
objintpattern
objintpattern
isurl = objintpattern
set objintpattern = nothing
z:
end function
private sub command
msgbox isurl( "
end sub
From:http://tw.wingwit.com/Article/program/net/201311/14016.html