Article View: news.software.nn
Article #6403Re: Suppressing kill entries for selected groups (SUMMARY)
From: Casper Maarbjerg
Date: Wed, 14 Sep 1994 23:23
Date: Wed, 14 Sep 1994 23:23
43 lines
2487 bytes
2487 bytes
wohler@newt.com (Bill Wohler) writes:
[...]
> I received the following from casper@dr.dk (Casper Maarbjerg) which works:
>
> How about putting a regular expression in the group name part:
>
> /\.[^a][^n][^n][^o][^u][^n][^c][^e]:+s/:announce
<blush> I hurried off and cancelled the posting, as soon as I realized
that it doesn't work! - I'm glad if you can make use of it though.
As I read the pattern, it says "a literal period, followed by 8
characters, each position excluding a particular character", and as nn
is a little unpractical to use for testing, I used egrep:
1 $ sed -e 's/ .*$//' ~news/active >/tmp/act # list of pure names
2 $ wc -l /tmp/act # this many:
266 /tmp/act
3 $ egrep announce /tmp/act | wc -l # containing `announce'
8
4 $ egrep '\.[^a][^n][^n][^o][^u][^n][^c][^e]' /tmp/act | wc -l
128
5 $ egrep '\.[^a][^n][^n][^o][^u][^n][^c][^e]' /tmp/act | egrep announce
comp.security.announce
comp.sys.sgi.announce
news.announce.newgroups
news.announce.newusers
For instance, it correctly excludes alt.uu.announce, but only because
there isn't 8 characters preceeding the "negated" word.
And apparently, it would miss the pre-select in a lot of groups, given a
real feed. Or, perhaps my egrep is broken ? or nn understand the
sense of the expression ?
It really would have been nice, if you could negate the match, like
6 $ egrep -v announce /tmp/act | wc -l
258
Best Regards,
--
Casper Maarbjerg / Danmarks Radio TV / casper@dr.dk Voice:+45 35 20 27 79
Technical Details
Message-ID:
<9409148464@kgv.dr.dk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!bga.com!news.sprintlink.net!deathstar.cris.com!news1.oakland.edu!vtc.tacom.army.mil!ulowell!europa.eng.gtefsd.com!howland.reston.ans.net!EU.net!sunic!trane.uninett.no!eunet.no!nuug!dkuug!dkuug!dkate.dr.dk!kgv.dr.dk!casperReferences:
<199409090507.WAA00491@newt.com> <199409121945.MAA24300@newt.com>Show Full Headers
Complete Article Headers
Message-ID: <9409148464@kgv.dr.dk> Subject: Re: Suppressing kill entries for selected groups (SUMMARY) Date: Wed, 14 Sep 1994 23:23:32 +0000 From: casper@dr.dk (Casper Maarbjerg) References: <199409090507.WAA00491@newt.com> <199409121945.MAA24300@newt.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!bga.com!news.sprintlink.net!deathstar.cris.com!news1.oakland.edu!vtc.tacom.army.mil!ulowell!europa.eng.gtefsd.com!howland.reston.ans.net!EU.net!sunic!trane.uninett.no!eunet.no!nuug!dkuug!dkuug!dkate.dr.dk!kgv.dr.dk!casper Newsgroups: news.software.nn Distribution: world Summary: Negating a word with a regular expression is not easy. Organization: Danmarks Radio TV - Public Service Broadcast Lines: 41