ASP Forum
how to do a partial string compare
matasp | Posted 11:19am 8. September 2010 Server Time |

While Not OpenFileobj.AtEndOfStream
stres1app    = Split(OpenFileobj.ReadLine,"~")
  For i=0 to UBound(stres1app)
     If stres1app(i) = strtexttosearch then
       ocnt=ocnt+1
       Response.write "<tr>"
       Response.write "<td>" & ocnt & "</td>"
       Response.write "<td>" & stres1app(0) & "</td>"
       Response.write "<td>" & stres1app(i) & "</td>"
     End If
     Response.write "</tr>"
  Next



  right now I'm comparing the exact string
     If stres1app(i) = strtexttosearch

if strtexttosearch is only part of stres1app(i), the above syntax won't work. How can I fix that.


Reply to Post how to do a partial string compare



Back to Forum Page