I’m trying to delete certain lines from a file. My file is a .txt and it looks like this:
[ITEMS]
[BANK]
[FRIENDS]
[EOF]
As my program runs, it writes lines in this file. Now what I want to do is have a method, that when I call it, it will delete all the lines in between [BANK] and [FRIENDS]. It can’t delete anything else. Leaving one empty line.
If you need more info, let me know!
This is partly finished code, to show you the idea what has to be done, but it may have some flaws, it uses Google Guava – http://code.google.com/p/guava-libraries/