Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    22

    Unanswered: serach for substring

    I have the code:
    <%

    subStr="*"
    mainStr= "12/11/204 * 4:00 AM"

    %>
    I want to check if subStr ("*") is in the mainStr
    How to do? What is the function? and what it return?. I need the position of the subStr. What does the function return if it not exist?

  2. #2
    Join Date
    Sep 2003
    Location
    Newark, Vermont
    Posts
    20
    Code:
    Response.Write Instr(1, mainStr, "*", 1)
    This will give you the number of the position of the character...

  3. #3
    Join Date
    Feb 2002
    Posts
    2,232
    What are you trying to accomplish ?

Posting Permissions

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