> In vi, I would do something like:
Does the command `flush-lines' do what you want?
,----[ C-h f flush-lines RET ]
| flush-lines is an interactive compiled Lisp function in `replace'.
| (flush-lines REGEXP &optional RSTART REND)
| Delete lines containing matches for REGEXP.
| If a match is split across lines, all the lines it lies in are deleted.
| Applies to lines after point.
| If REGEXP contains upper case characters (excluding those preceded by `\'),
| the matching is case-sensitive.
| Second and third arg RSTART and REND specify the region to operate on.
| Interactively, in Transient Mark mode when the mark is active, operate
| on the contents of the region. Otherwise, operate from point to the
| end of the buffer.