I get StrTxt as html string by http request response text. I want to find all occurrences of '"string"' in the StrTxt.
Something like this.
for each string in StrTxt
StrTxt = "all matched strings from StrTxt"
do something StrTxt.
Edit This is tagged as possible duplicate but it's not. How to loop through each word in a word document - VBA Macro explains how to find string in document and not string.
It is just simple. How to find all strings withing strings? Isn't my title explains everything?
Edit 2
From answer of Ansgar Wiechers I tried following.
Do
i = InStr(strtxt, "startstring")
If i > 0 Then
strtxt = Mid(strtxt, i, Len(strtxt) - i)
i = InStr(InStr(strtxt, "midstring") + 1, strtxt, "endstring")
If i > 0 Then
strtxt = Left(strtxt, i + Len(endstring)) ' I am using i+4 as I know the length
WScript.Echo strtxt
End If
End If
Loop While i > 0
It gives only one occurences. How to loop correctly?