|
-
Jan 6th, 2008, 01:10 AM
#1
Thread Starter
Hyperactive Member
[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
-
Jan 6th, 2008, 01:12 AM
#2
Frenzied Member
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?
-
Jan 6th, 2008, 01:15 AM
#3
Thread Starter
Hyperactive Member
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>
-
Jan 6th, 2008, 01:25 AM
#4
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|