Sunday, April 24, 2011

How to match A but not B

I want to match lines that contain the word, DEBIT but do not contain the
word PPD. How to I construct a pattern that will do this?

For example the pattern should exclude a line like,

DEBIT, this is a line with PPD in it


But the pattern should match:

DEBIT, this is a line without a certain word in it.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment