Results 1 to 4 of 4

Thread: [RESOLVED] Strings

  1. #1

    Thread Starter
    Hyperactive Member jlt7's Avatar
    Join Date
    Jan 2006
    Posts
    413

    Resolved [RESOLVED] Strings

    Is it possible to have 2 diffrent respones for the same string.

    like

    dim txt1 as string

    txt1 = Something
    if txt1 <> something then
    txt1 = something else
    end if

    I have tried it like the above way and it won't work for me.
    I'm parsing from the internet.
    the part in red is what changes from time to time

    this is the code I have

    Code:
    strStart = "</a>"
    strEnd = "</td>"
    
    
    lonPos = InStr(1, Data, strStart, vbTextCompare)
    
    If lonPos > 0 Then
        lonPos = lonPos + Len(strStart)
        
        lonEnd = InStr(lonPos, Data, strEnd, vbTextCompare)
        
        If lonEnd > 0 Then
            strInfo = Mid$(Data, lonPos, lonEnd - lonPos)
    
        End If
    End If

  2. #2
    Frenzied Member
    Join Date
    Dec 2007
    Posts
    1,072

    Re: Strings

    What?

    My Interpretation:
    So you have a string...

    You want to get in between two strings?

    String = "momdadbro"

    And you want to get in between "mom" and "bro"
    Resulting in dad?

  3. #3

    Thread Starter
    Hyperactive Member jlt7's Avatar
    Join Date
    Jan 2006
    Posts
    413

    Re: Strings

    Yes that is correct

    what I have works most of the time but that one part changes from time to time from what I have above in the strEnd to <small>

  4. #4

    Thread Starter
    Hyperactive Member jlt7's Avatar
    Join Date
    Jan 2006
    Posts
    413

    Re: Strings

    Nevermind, I used a replace function to replace the part I needed.

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