例如:
ss = "http://community.csdn.net/Expert/upload/20023423.rm "
ss = "http://community.csdn.net/Expert/upload/2002asd3423.mp3 "
都是这些值,怎么获得 rm ,mp3
------解决方案--------------------
有个笨办法,用反转函数先把字符串反转过来,再取/在字符串中的第一个位置,再用left函数取左起到/前的字符串,再反转……
因为找不到asp里面取字符在字符串中的最后出现的位置,只有用这个笨办法了:)
dim ss
ss = "http://community.csdn.net/Expert/upload/20023423.rm "
ss = strreverse(ss)
ss = left(ss,instr(ss, "/ ")-1)
ss = strreverse(ss)
response.write ss
------解决方案--------------------
<%
dim ss,tempArray,result
ss = "http://community.csdn.net/Expert/upload/2002asd3423.mp3 "
tempArray=split(ss, ". ")
result = tempArray(ubound(tempArray))
response.write result
%>
楼上考虑的是有道理的,不过我觉得把问题复杂化了