-
[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
-
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?
-
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>
-
Re: Strings
Nevermind, I used a replace function to replace the part I needed.