instr function

Results 1 to 2 of 2

Thread: instr function

  1. #1
    Join Date
    Dec 1969

    Default instr function

    Hi,<BR>How to I use the instr function to find if the string has any double quotes(").<BR>This does not seem to work:<BR>instr(1, clientdesc,"&quot;",vbBinarycompare)<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default Not InStr at all...

    The *real* question is, how do you put a double quote *into* a string in VBScript. Right?<BR><BR>And the answer is: Use a pair of " marks.<BR><BR>So:<BR><BR>instr(1, clientdesc, """", vbBinarycompare)<BR><BR>But unless the character(s) you are searching for are letters, you don&#039;t need the comparison type. So this is equivalent:<BR><BR>instr(clientdesc, """")<BR><BR>And, finally, if """" makes you nervous:<BR><BR>instr(clientdesc, Chr(34) )<BR><BR>is the same thing.<BR><BR><BR><BR>

Posting Permissions

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