created March 21, 2006 · complexity basic · author Bertram Scharpf · version 6.0
When examining a long log file, you might want to find lines not containing a word. For lines not containing "Warning", the search command is:
You might want to add a little note on matching, as the manual states..."Using "\@!" is tricky, because there are many places where a pattern does not match".
If you want to see all such lines at once, there's the traditional (but simple):
A neat trick when working with a large log file where you want to filter out as many irrelevant lines as possible before you get started on your real search is:
Now you are editing a clone of your original file and can mess about at will. For example, the following will delete all lines that do not contain the text "warning":