On 9/22/06, Eric Leenman <[EMAIL PROTECTED]> wrote:
Hi

I have a file where I deleted all lines that don't contain a certain pattern
For example I want to delete all lines that don't contain XXX and YYY.

Before:

[start of file]
abcde XXX fghij YYY
12345 AAA 67890 BBB
klmno XXX pqrst YYY
09876 XXX 54321 BBB
&*()- XXX ,./;' YYY
[end of file]

After:
[start of file]
abcde XXX fghij YYY
&*()- XXX ,./;' YYY
[end of file]

:v/XXX.*YYY/d

or

:g!/XXX.*YYY/d

Yakov

Reply via email to