Hello, im using ex to manipulate some text. Im trying to delete all the lines except those on which a certain regex can be found.
the important part of the script:
ex temp << 'HERE'
g/regex/p
HERE
this command prints the lines I want to end up with, but it doesnt delete the others. is there a way to solve this?
something like
g/!regex/d
or
anything else?
thx alot!