关于字符串得取法问题!高难度啊!一直搞不定!!!!
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<%Function HTMLEncodex(fString)
If IsNull(fString) Then
HTMLEncodex = ""
Exit Function
End If
fString=Replace(fString,"<br>",vbCrlf)
fString=Replace(fString,""",Chr(34)) 'Chr(34)是双引
fString=Replace(fString,"'","'")
fString=Replace(fString,"--","--")
fString=Replace(fString,"\","\")
fString=Replace(fString,">",">")
fString=Replace(fString,"<","<")
fString=Replace(fString," "," ")
fString=Replace(fString," ", " ")
fString=Replace(fString,";",";")
HTMLEncodex=fString
End Function
Function Leftstr(MyStr,Length)
MyStr = Ltrim(MyStr)
If Length < Len(MyStr) Then '返回得字符串长度
Leftstr = Left(MyStr,Length)&"┅" '截取一个字符串的前部分
Else
Leftstr= MyStr
End If
End Function
%>
<%=Leftstr(HTMLEncodex(Trim("[01.25][美国][喜剧][金发尤物][DVD-RMVB/375M][英语/中字][07最新美女性感大片]")),12)%>
<body>
</body>
</html>
运行后得结果为:[01.25][美国][┅
要求是将此字符串:[01.25][美国][喜剧][金发尤物][DVD-RMVB/375M][英语/中字][07最新美女性感大片]
转换取出值为:[金发尤物]
也就是要去掉其它得字符串!!