Is there a way to do a inverse search? I have very big log file where a particular pattern fills up for few dozen pages
20100414 alpha beta
20100414 alpha beta
<few dozen pages>
20100414 alpha beta
20100414 gamma delta
20100414 gamma delta
<few dozen pages>
20100414 gamma delta
Problem is, I don't know what text would be after "alpha beta". It could be "gamma delta" or something else. So I would like to skip all the lines that contain "alpha beta".
Two ideas:
M-x keep-lines <RET> REGEXP <RET>
will remove all lines not matching a regexp
M-x grep <RET> grep -nH -e "<REGEXP>" -v <FILE>
will find all lines in NOT containing your regexp.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With