Results 1 to 2 of 2

Thread: string

  1. #1
    Join Date
    Dec 1969

    Default string

    hi...I would like to find a particular word in a string if it exist do something...I&#039;m trying to find a function to do this:<BR><BR>Logic:<BR>myStr="need help"<BR>if "need" in myStr do something<BR><BR>InStr only returns numeric position.<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: string

    All you need is the numeric value. Try this out.<BR><BR>MyString = "dude where is my car"<BR><BR>&#039;Check for string<BR>If Instr(MyString,"dude") &#060;&#062; 0 Then<BR> &#039;Process script based on us finding string<BR> Response.Write("Found.")<BR>Else<BR> &#039;String not found<BR> Response.Write("Not-Found.")<BR>End If

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts