View Full Version : Checking a string contains a substring
lovebearhk
08-20-2008, 12:03 PM
Hi everyone,
Does anyone know the ASP code for checking a string contains a substring?
Thanks!
abduraooft
08-20-2008, 12:56 PM
http://forums.asp.net/t/979784.aspx may help.
brazenskies
08-20-2008, 01:39 PM
Not sure if I am suggesting the write thing here, but...
<%
dim theString
theString = "Is this in the string?"
if instr(theString, "in the")
then
inString = "true"
else
inString = "false"
%>
lovebearhk
08-21-2008, 10:39 AM
It works now, thanks! :)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.