HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
The InStrRev function returns the position of the first occurrence of one string within another. The search begins from the end of string, but the position returned counts from the beginning of the string."
<%
txt="This is a beautiful day!"
response.write(InStrRev(txt,"beautiful"))
%>
The output of the code above will be:
11
Finding the letter "i", using different starting positions:
<%
txt="This is a beautiful day!"
response.write(InStrRev(txt,"i",-1) & "<br />")
response.write(InStrRev(txt,"i",7) & "<br />")
%>
The output of the code above will be:
16
6
Finding the letter "T", with textual, and binary, comparison:
<%
txt="This is a beautiful day!"
response.write(InStrRev(txt,"T",-1,1) & "<br />")
response.write(InStrRev(txt,"T",-1,0) & "<br />")
%>
The output of the code above will be:
15
1
❮ Complete VBScript Reference