[RESOLVED] Search for a second instance of a string
hi all.
What im trying to do is search through some html right. There is a certain code before the text that i wish to extract. So what i have done is made it search fro the text that will always be there and then selected the next few characters to get the random text that i need.
the problem i am having is i do not no how to search through the textbox with the html in it, and then ignore the first instance of it once its already found that one...
i no this isnt very well explained, ask me if you want me to re-explain :)
oh and also, i am using the "instr" call to find what i want...
thanks
1 Attachment(s)
Re: Search for a second instance of a string
This is not what you are looking for but it will guide you for what you are looking for
Re: Search for a second instance of a string
Quote:
Originally Posted by feneck
... i am using the "instr" call to find what i want...
Since you already know how to use it I will just give you some guidance:
next occurence of the same string can be found using this logic:
Code:
pos1 = InStr(1, source_string, search_string)
Debug.Print InStr(pos1 + 1 + Len(search_string), source_string, search_string)
Re: Search for a second instance of a string