🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #41431

Re: A killfile feature someone should invent

#41431
From: Conrad Sabatier
Date: Wed, 10 Jun 1998 00:00
45 lines
2063 bytes
In article <6lhf2a$f5p@espresso.cafe.net>, Kaz Kylheku <kaz@cafe.net> wrote:
>
>Articles with an all-caps subject line could be matched and junked (marked as
>read) by:
>
>	/^Subject: [A-Z]*$/:j

This isn't quite correct, actually.  What you're saying here is kill any
article whose subject line contains NOTHING BUT CAPS (actually, you're
not even doing that; see the next paragraph).  This, of course, does not
allow for all caps subjects that include spaces and other 
punctuation/non-alpha characters.

Also, as you forgot to use the "c" modifier, your regex is not
case-sensitive, meaning it will kill any subject with *any* alpha
character in it!

The correct approach is to filter any subject that *doesn't* contain
at least one lowercase (alpha) character:

/^Subject: [^a-z]*$/c:j

As you mentioned, it's a good idea to include an optional "Re:" as well:

/^Subject: [Re:]* [^a-z]*$/c:j

Technically speaking, the "[Re:]*" above does not match *only* "Re:" (it
actually matches a *set*, meaning any sequence of any of the characters
between the brackets will match), but it's about the best you can do in
trn.  If you wanted to be *really* accurate, you would have to code a
separate filter with the Re: as a literal:

/^Subject: Re: [^a-z]*$/c:j

Or possibly even:

/^Subject: R[eE]: [^a-z]*$/c:j

to allow for retarded newsreaders who insert "RE:" instead of "Re:".
-- 
Conrad Sabatier
http://www.neosoft.com/~conrads/

Technical Details
Message-ID: <6lm59j$dah$1@dolphin.neosoft.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <6lfcl2$lcc$1@supernews.com> <6lhf2a$f5p@espresso.cafe.net>

Show Full Headers
Complete Article Headers
Message-ID: <6lm59j$dah$1@dolphin.neosoft.com>
Subject: Re: A killfile feature someone should invent
Date: Wed, 10 Jun 1998 00:00:00 +0000
From: conrads@neosoft.com (Conrad Sabatier)
References: <6lfcl2$lcc$1@supernews.com> <6lhf2a$f5p@espresso.cafe.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 361422739
Organization: NeoSoft, Inc.
Newsgroups: news.software.readers