* 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 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).