<%
Function getDomain(domain)
Dim re,ReturnStr,Matches
Set re=new RegExp
re.IgnoreCase =True
re.Global=True
re.Pattern = "(/w+/.(com.cn|net.cn|com|cn|net|org))"
Set Matches = re.Execute(domain)
ReturnStr = ""
For Each Match in Matches
ReturnStr = Match.Value
Exit for
Next
getDomain = ReturnStr
Set re=Nothing
End Function
response.write getDomain("http://www.bak.sina.com.cn/abc.htmlhttp://www.bak.baidu.com.cn/abc.html")
%>
Function getDomain(domain)
Dim re,ReturnStr,Matches
Set re=new RegExp
re.IgnoreCase =True
re.Global=True
re.Pattern = "(/w+/.(com.cn|net.cn|com|cn|net|org))"
Set Matches = re.Execute(domain)
ReturnStr = ""
For Each Match in Matches
ReturnStr = Match.Value
Exit for
Next
getDomain = ReturnStr
Set re=Nothing
End Function
response.write getDomain("http://www.bak.sina.com.cn/abc.htmlhttp://www.bak.baidu.com.cn/abc.html")
%>