help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to kill line beginning with specific string


From: Giorgos Keramidas
Subject: Re: How to kill line beginning with specific string
Date: Thu, 19 Nov 2009 10:47:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (berkeley-unix)

On Wed, 18 Nov 2009 10:51:29 -0800 (PST), brooklynwhite <white805@umn.edu> 
wrote:
> I need to figure out how to kill a series of lines in a text file that all
> begin with the same string.  The format of the lines is:
>
> 2000 001 00        AIR TEMP     354
>
> The second and third expressions in the line change with subsequent
> lines, e.g.:
>
> 2000 002 01        AIR TEMP     354
>
> Is there a simple way for me to search for and kill all of these lines
> without having to repeatedly enter the search mode and type ctrl-k
> when the line is found?  I realize this may be a silly question so
> thanks for your patience and help.

You can use `M-x flush-lines RET'.  Note that the `flush-lines' argument
is a regular expression, but it should work fine for simple string
matching too.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]