Hi,
I have a text file on a web server. Every line of the text file ends with "g]" or with "a]".
I would like to count the lines that end with "g]" and the lines that end with "a]".
How can I do that?
Before I hade two seperate files and I used the following code for counting.
But now I decided to put everthing into a single file:
Code:Dim client1 As New System.Net.WebClient Dim file1 As String = client.DownloadString("URL/file1") 'lines ending with "g]" Dim lines1 As String() = file1.Split(Environment.NewLine) Dim client2 As New System.Net.WebClient Dim file2 As String = client2.DownloadString("URL/file2") 'lines ending with "a]" Dim lines2 As String() = file2.Split(Environment.NewLine) MsgBox("There are " & lines1.Length & " red cars" & vbNewLine & "There are " & lines2.Length & " black cars")
Thank you in advance,
Andrea




Reply With Quote
