I want to print out all lines in a file (assume that each letter represents a pattern) that match the following:
not (a and (b or c or d or e or f))
Can grep do this, or should I use another tool?
Yes, I know that I could rewrite this as:
grep -v ab|ac|ad|ae|af
But the actual expression already contains several hundred characters with almost thirty alternatives in the “or” clause of the pseudocode, and I would like to avoid nearly doubling the length of the expression, if possible.