🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
7 messages
7 total messages Started by Owen M. Astley Mon, 31 Aug 1998 00:00
killing ALL-CAPS Subjects in [t]rn
#42947
Author: Owen M. Astley
Date: Mon, 31 Aug 1998 00:00
19 lines
1093 bytes
Does anybody know how to use the kill file in [t]rn to remove all-caps
(plus a few extra characters) subjects: I've tried
various things along the lines of...

/^Subject: [A-Z][A-Z!. ]*/c=:j
/^Subject: Re: [A-Z][A-Z!. ]*/c=:j
/^Subject: \(Re: \|\)[A-Z!. ]\{1,\}/c=:j
/^Subject: [A-Z!. ]\{1,\}/c=:j
/^Subject: Re: [A-Z!. ]\{1,\}/c=:j

in my Global kill file, but:
a) they don't seem to work
b) I'm not entirely sure which of the regexps trn supports.

Thanks, Owen



Re: killing ALL-CAPS Subjects in [t]rn
#42943
Author: Christian Weisgerber
Date: Mon, 31 Aug 1998 00:00
29 lines
1465 bytes
In article <6scvhq$9mf$1@pegasus.csx.cam.ac.uk>,
Owen M. Astley <oma1000@cam.ac.uk> wrote:

> Does anybody know how to use the kill file in [t]rn to remove all-caps
> (plus a few extra characters) subjects:

These are for trn4. I don't know whether they work with previous
versions.

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

(Courtesy of Tom Christiansen.)

Another global entry I find valuable is this:

    /\([><~@=:$!?^-]\)\0\0/:j

I.e. junk all articles which contain one of !!! ??? $$$ etc. in their
subject.

Either no more spam is posted to Usenet--which I consider unlikely--or
those two expressions filter out pretty much all of it, along with those
annoying "HELP!!!" requests and similar garbage.

-- 
Christian "naddy" Weisgerber                  naddy@mips.rhein-neckar.de
  See another pointless homepage at <URL:http://home.pages.de/~naddy/>.

Re: killing ALL-CAPS Subjects in [t]rn
#42955
Author: Conrad Sabatier
Date: Mon, 31 Aug 1998 00:00
18 lines
1115 bytes
In article <6sdtra$qk2$1@mips.rhein-neckar.de>,
Christian Weisgerber <naddy@mips.rhein-neckar.de> wrote:
>In article <6scvhq$9mf$1@pegasus.csx.cam.ac.uk>,
>Owen M. Astley <oma1000@cam.ac.uk> wrote:
>
>> Does anybody know how to use the kill file in [t]rn to remove all-caps
>> (plus a few extra characters) subjects:
>
>These are for trn4. I don't know whether they work with previous
>versions.
>
>    /^Subject:[Re: ]*[^a-z]*$/c:j
               ^
               |

Insert a space before the bracket.

Re: killing ALL-CAPS Subjects in [t]rn
#42956
Author: Christian Weisgerber
Date: Tue, 01 Sep 1998 00:00
27 lines
1644 bytes
In article <6sg4sd$mbh$1@trotsky.cig.mot.com>, Stephen Lee
<stephen@cig.nml.mot.com> wrote:

> >    /^Subject:[Re: ]*[^a-z]*$/c:j
>                ^^^^^^^
> Does this part work?

Look, I *have* this exact expression in my ~/News/Kill/Global.
I copy'n'pasted it from there. I assure you it works.

Very occasionally it *may* catch an innocent article. There are in fact
articles that have a suject line without lower case letters for
justifiable reasons. I don't know how it interacts with RFC2047
MIME-encoded subject lines. Caveat emptor.

> Not that it strips out anything useful but...

"[Re: ]" is a character class, i.e. it matches any of the characters
'R', 'e', ':', ' '. The suffixed star means that this class can match
arbitrarily often. It may not be elegant, but it matches "Re: " and
"Re: Re: ", etc.

-- 
Christian "naddy" Weisgerber                  naddy@mips.rhein-neckar.de
  See another pointless homepage at <URL:http://home.pages.de/~naddy/>.

Re: killing ALL-CAPS Subjects in [t]rn
#42973
Author: Stephen Lee - Post replies pleas...
Date: Tue, 01 Sep 1998 00:00
30 lines
1419 bytes
In article <6sdtra$qk2$1@mips.rhein-neckar.de>,
Christian Weisgerber <naddy@mips.rhein-neckar.de> wrote:
>In article <6scvhq$9mf$1@pegasus.csx.cam.ac.uk>,
>Owen M. Astley <oma1000@cam.ac.uk> wrote:
>
>> Does anybody know how to use the kill file in [t]rn to remove all-caps
>> (plus a few extra characters) subjects:
>
>These are for trn4. I don't know whether they work with previous
>versions.
>
>    /^Subject:[Re: ]*[^a-z]*$/c:j
               ^^^^^^^

Does this part work?  Not that it strips out anything useful but...

I use (trn4):

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

Would like something along the line of

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

but haven't gotten it to work yet.

Stephen

Re: killing ALL-CAPS Subjects in [t]rn
#43180
Author: brian moore
Date: Fri, 11 Sep 1998 00:00
36 lines
2271 bytes
On 1 Sep 1998 22:57:14 +0200, 
 Christian Weisgerber <naddy@mips.rhein-neckar.de> wrote:
> In article <6sg4sd$mbh$1@trotsky.cig.mot.com>, Stephen Lee
> <stephen@cig.nml.mot.com> wrote:
> 
> > >    /^Subject:[Re: ]*[^a-z]*$/c:j
> >                ^^^^^^^
> > Does this part work?
> 
> Look, I *have* this exact expression in my ~/News/Kill/Global.
> I copy'n'pasted it from there. I assure you it works.
> 
> Very occasionally it *may* catch an innocent article. There are in fact
> articles that have a suject line without lower case letters for
> justifiable reasons. I don't know how it interacts with RFC2047
> MIME-encoded subject lines. Caveat emptor.
> 
> > Not that it strips out anything useful but...
> 
> "[Re: ]" is a character class, i.e. it matches any of the characters
> 'R', 'e', ':', ' '. The suffixed star means that this class can match
> arbitrarily often. It may not be elegant, but it matches "Re: " and
> "Re: Re: ", etc.

It also matches "e:r ", "rrrrrrrrrrrrr" and ":::::::::" and a whole slew
of other things.

I'd use parens not brackets.

-- 
Brian Moore                         | "The Zen nature of a spammer resembles
      Sysadmin, C/Perl Hacker       |  a cockroach, except that the cockroach
      Usenet Vandal                 |  is higher up on the evolutionary chain."
      Netscum, Bane of Elves.                   Peter Olson, Delphi Postmaster

Re: killing ALL-CAPS Subjects in [t]rn
#43181
Author: Dawn Owens-Nicholson
Date: Fri, 11 Sep 1998 00:00
13 lines
1234 bytes
Christian Weisgerber wrote:
>    /^Subject:[Re: ]*[^a-z]*$/c:j
>    (Courtesy of Tom Christiansen.)

Which is interesting--does trn supports grouping with parentheses?  One
would think he would have used the more appropriate "(Re: )*" and not
"[Re:]*" which matches a bunch of stuff one doesn't want to match. Also,
there seems to be a space missing immediately after "^Subject:" (perhaps an
optional space is better).  Maybe this is a different person than the one
associated with Perl (a programming language where regular expressions are
often used), but that seems too unlikely.

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads