Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim newLines = From line In File.ReadAllLines(path)
- Where Not line.StartsWith("{TAM98}")
- File.WriteAllLines(path, newLines)
- Dim sb As New System.Text.StringBuilder()
- Dim myFilePath As String = "c:MyFile.txt"
- Dim mySearchToken As String = "{TAM98}"
- For Each line As String In System.IO.File.ReadLines(myFilePath)
- If (String.Compare(Left(line, mySearchToken.Length), mySearchToken, True) <> 0) Then sb.AppendLine(line)
- Next
- System.IO.File.WriteAllText(myFilePath, sb.ToString())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement