I want to search for a certain word in a different way, I just got the one described below:
<%
mystring = "Como eu faço para separar uma string em várias strings?"
myarray = Split(mystring, " ")
For i = 0 to Ubound(myarray)
Response.Write i & " - " & myarray(i) & "<br>"
if myarray(0) = "Como" then
existe = "Sim"
Else
existe = "Nao"
end if
Next
Response.Write "Resposta Final >" & existe
%>
0 - Como
1 - eu
2 - faço
3 - para
4 - separar
5 - uma
6 - string
7 - em
8 - várias
9 - strings?
Final Response> Yes
I want to look in all the string that I turned into array, looking not for position myarray(0)
zero, for example, but for myarray(i)
, however the result comes "No", I need use this structure in another project that uses CheckBox's and I will never know which position will come. You can change to myarray(i)
form.