I have a file, that looks like this:
expression1
- expresson1.1
- expressoion1.2
expression2
-expression2.1
expression3
-expression3.1
-expression3.2
-expression3.3
What I want to do is, delete lines 1.2, 3.2 and 3.3, so only lines that do not start with a minus, and the next line remain.
So I tried writing a regex that matches every line starting with a minus where the previous one also started with a minus, and then delete them.
So far, no success. Any hints would be very appreciated.