Archive for February 14th, 2009

Negation in regular expressions

Saturday, February 14th, 2009

How to search for lines that don’t contain a particular pattern is fairly easy in some programs, obscure in others, and almost impossible yet in others. That is, assuming your program of choice supports regular expressions. I review how to achieve this functionality in Perl, Vim, grep, and vi.
(more…)