Lets say I have a text file that has 30 to 40 lines in it. Each line looks something like this:
2019562.121 * The dude walked the dog 10 times
how would I remove everything before the asterisk in each line?
Thanks for any help
Printable View
Lets say I have a text file that has 30 to 40 lines in it. Each line looks something like this:
2019562.121 * The dude walked the dog 10 times
how would I remove everything before the asterisk in each line?
Thanks for any help
As you loop through file, you can read each line into a string variable and then
strx.Substring(strx.IndexOf("*") + 1)
thanks, as soon as I wrote this post I realized I could just do this:
Code:
Dim text As String
Dim oread As IO.StreamReader
oread = IO.File.OpenText("blahblahblah.txt")
Dim textcut As String
While oread.Peek <> -1
text = oread.ReadLine
textcut = text.Remove(0, 15)
txt2.Text = txt2.Text & vbCrLf & textcut
End While
Yeah, simple solutions are the best.