Results 1 to 11 of 11

Thread: [Resolved] IndexOf Text in Quotations

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member ...:::ONE:::...'s Avatar
    Join Date
    May 2004
    Location
    Netherlands
    Posts
    282

    Question [Resolved] IndexOf Text in Quotations

    I'm trying to find the index of "some text", including the quotations. I've tried a few ways to escape the quotations but all have failed, resulting in an index of -1

    Example...
    Code:
    Dim txtFile as String
    Dim txtIndex as Integer
    
    txtFile = 'Some text file
    
    txtIndex = txtFile.IndexOf(Chr(34) & "some text" & Chr(34)) ' Index = -1, failed.
    txtIndex = txtFile.IndexOf("""some text""") ' Index = -1, failed.
    Is there anyway to get the index of a text that contains quotes?



    Thanks,
    -Chris
    Last edited by ...:::ONE:::...; Jun 2nd, 2013 at 10:29 AM.
    6 Years

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width