all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* how to flush lines that do NOT include characters 'FK'
@ 2003-08-07 11:41 Roland Reichenberg
  2003-08-07 12:11 ` lawrence mitchell
  0 siblings, 1 reply; 3+ messages in thread
From: Roland Reichenberg @ 2003-08-07 11:41 UTC (permalink / raw)


Hi NG,

in my buffer, I want to flush all lines that do NOT contain the letters "FK"

My buffer contains lots of lines like:
laksjdfh
oqwirutz
095876
mxvb
aelkdjfFKddd
dffff
kkkkss
kkssss
aeskldjfopqirt
iquirmvqkrik
owuiertznvc
q9prskladhf
FK_hhh20894
1s9845FK01
095678jf
ajfhlakjdfh

>From these lines I want to filter the follwing
aelkdjfFKddd
FK_hhh20894
1s9845FK01

Any suggestions for a REGEXP?

I have tried the following:
M-x flush-lines [^FK]

But without success.

Who can help?

Thanks in advance,

        Roland

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to flush lines that do NOT include characters 'FK'
  2003-08-07 12:11 ` lawrence mitchell
@ 2003-08-07 12:08   ` Roland Reichenberg
  0 siblings, 0 replies; 3+ messages in thread
From: Roland Reichenberg @ 2003-08-07 12:08 UTC (permalink / raw)


Hi lawrence,

> M-x keep-lines RET FK RET

was what I was looking for! Thank you very much!

Roland

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to flush lines that do NOT include characters 'FK'
  2003-08-07 11:41 how to flush lines that do NOT include characters 'FK' Roland Reichenberg
@ 2003-08-07 12:11 ` lawrence mitchell
  2003-08-07 12:08   ` Roland Reichenberg
  0 siblings, 1 reply; 3+ messages in thread
From: lawrence mitchell @ 2003-08-07 12:11 UTC (permalink / raw)


Roland Reichenberg wrote:

> in my buffer, I want to flush all lines that do NOT contain the letters "FK"

[...]

> Any suggestions for a REGEXP?

> I have tried the following:
> M-x flush-lines [^FK]

Writing regexps for matching "not something" is generally quite
difficult, especially if "something" is more than a single
character.  Instead, I suggest you look to try and keep all
lines containing the letters "FK".  Thankfully such a function
already exists.  So you can do:

M-x keep-lines RET FK RET

and not have to worry about nasty regexps :)

-- 
lawrence mitchell <wence@gmx.li>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-08-07 12:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-07 11:41 how to flush lines that do NOT include characters 'FK' Roland Reichenberg
2003-08-07 12:11 ` lawrence mitchell
2003-08-07 12:08   ` Roland Reichenberg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.