I wrote an application in vb 6.0. Very simple using the winsock control. Everything works fine.. Except certain things.
One of the problems is that my winsock data coming in is chunked. At first I used an example like this:
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim Data As String
Winsock1.GetData Data
text1 = Data
End If
Then I would get sporadic text with a few characters only appearing.
Then I tried:
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim Data As String
Winsock1.GetData Data
text1 = text1 & Data
End If
Which seems to collect all the data, but there are many carriage returns & blocks in the text. I would like to be able to collect the whole dataarrival & Display it entirely & clearly to perform a regex.
The regex I need to scan the dataarrival with is:
Delimiter or special characters = "/?"
And after that, perform this regex:
regex.Pattern = "<a href=x22[^>]*x22 href=([^>]*)>(.*?)</a>"
I can explain more as I am trying to extract certain hyperlinks from the winsock dataarrival.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment