I have a web page source and want to extract some info. I have this:
The problem is this: intPos2 = strText.LastIndexOf("</h>", intPos1)Code:Dim strText As String, intPos1 As Integer = 0, intPos2 As Integer = 0 strText = rtBox1.Text While intPos2 < strText.Length intPos1 = strText.IndexOf("<h>", intPos1) intPos2 = strText.LastIndexOf("</h>", intPos1) MsgBox(intPos1 & " " & intPos2) 'MsgBox(Mid(strText, intPos1 + 3, intPos2), MsgBoxStyle.Information) If intPos2 = -1 Then Exit While intPos2 = (intPos2 + 1) End While
if I remove the ", intPos1" from LastIndexOf it works but I want to continue in the text but if I place a Integer after "("</h>", X)" I get -1 as result = no match?? Thanks for clearing this out


Reply With Quote