Open Source Research and Development

Free and Open Source R&D Projects, Articles, and Reviews

Month: February 2009

Negation in regular expressions

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.