here is the code:
this function is supposed to search for "<SPAN class=LstName>" in a whole bunch of html code. then go right character by character until it reaches the ">". After that it puts in variable num eveerything between the > and the next < tags. which its supposed to be a person name. The problem is that there are a lot of lines like this in the html file, and I want this function to keep doing the same thing for the next lines. Thats why I added the r variable, to start the first LOOP lookking for the "<SPAN class=LstName>" at r everytime. but for some reason the result is always 10 records of each line with the same name. Something is wrong with the r. it doesnt start from r postiion in the string like its supposed to.
VB.NET:
Function get_pname(ByVal text As String)
Dim num As String
Dim c
Dim s As Integer
Dim t
Dim r
For c = text.IndexOf("<SPAN class=LstName>", r) + 20 To text.Length - 1
If text.Chars(c) = ">" Then
MsgBox(r)
For t = c To text.Length - 1
If text.Chars(t) = "<" Then
num = text.Substring(c + 1, t - c - 1)
r = (t - c - 1)
Return (num)
End If
Next
End If
MsgBox(r)
Next
End Function