As title said, I need a help about it
Text:
My code:
I want to delete line (blabla) until last line (this text2), but have a error in this part For u As Integer = lines.Count - 1 To lines(i) Step -1
Any help? thankyou
Text:
Code
this text1
this text11
this text11
this text11
blabla
this text2My code:
Code
Dim lines As New List(Of String)
lines = txt1.Lines.ToList
Dim FilterText = "(blabla )"
For i As Integer = lines.Count - 1 To 0 Step -1
If Regex.IsMatch(lines(i), FilterText) Then
For u As Integer = lines.Count - 1 To lines(i) Step -1
lines.RemoveAt(u)
Next
End If
Next
txt1.Lines = lines.ToArrayI want to delete line (blabla) until last line (this text2), but have a error in this part For u As Integer = lines.Count - 1 To lines(i) Step -1
Any help? thankyou



![[Image: vvtBnN0.png]](https://i.imgur.com/vvtBnN0.png)