Recommended: parse voting in Asp implementation Dig program ASP makes a vote in a dig program (some are called top and step on). Because the code is long, only the core part is posted: the code page in the voting displays the vote part: div class=Vote1script src='/voteResult.asp?id=1action=view'/script/div The effect is shown in the figure: 520) this.width=500 border=0>, and then click to vote.
<%
dwwwStr= <div>dwww.cn</div><div>www.dwww.cn</div>Design home
dwwwStr= InStrRev(dwwwStr,</div>)
response.write dwwwStr
%>
InstrRev
describe
Returns the position from the end of a string that appears in another string.
grammar
InstrRev(string1, string2[, start[, compare]])
The syntax of the InstrRev function has the following parameters:
Parameter description
string1 Required. A string expression that accepts searches.
string2 Required. The string expression being searched for.
start Optional. Numeric expressions that set the start position of each search. If omitted, the default value is -1, indicating that the search starts from the position of the last character. If start contains Null, an error occurs.
compare Optional. When calculating a substring, the value of the comparison type to be used is indicated. If omitted, a binary comparison will be performed. For values, see the Settings section.
set up
The compare parameter can have the following values:
Constant Value Description
vbBinaryCompare 0 Perform binary comparison.
vbTextCompare 1 Perform text comparison.
vbDatabaseCompare 2 performs a comparison based on information contained in the database (in which comparison is performed).
Return value
InStrRev returns the following values:
If InStrRev returns
string1 is zero length 0
string1 is Null Null
string2 is zero length start
string2 is Null Null
string2 No 0 found
Find string2 in string1 Find the location of the matching string
start > Len(string2) 0
illustrate
Note that the syntax of the InstrRev function is different from that of the Instr function.
Share: Analysis of how to filter uncivilized characters % Function badchar(str) badstr=Uncivilized character list, separate with | (because the characters cannot be contained when publishing, it cannot be posted.) badword=split(badstr,|) For i=0 to Ubound(badword) If instr(str,badword(i)) 0 then badchar=True Exit For Else badchar=False End If Next