<%
function sub_str(byval str, byval pstr) ' str 为要截取的字符串,pstr 限定的字符
pos = instr(str, pstr)
if pos > 0 then str = left(str, pos + len(pstr) - 1)
sub_str = str
end function
str = "upfile/Smallpic/201141314212195588.jpg,%20"
response.Write sub_str(str, ".jpg")
%>
方法有很多,举一例如下:
k="upfile/Smallpic/201141314212195.jpg%f,20%,"
response.Write left(k,InstrRev(k,".")+3)