🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #5462

Re: How to kill subject with only Capitals & Punctuation?

#5462
From: Dave Wolfe
Date: Wed, 16 Feb 1994 19:07
30 lines
2093 bytes
In <2jrj0d$oua@nwfocus.wa.com> Nancy McGough <nancym@ii.com> writes:

>dlyons@unix1.tcd.ie (Donal Lyons) writes:
>>I've been using Nancy McGough's solution until now and it seemed to work
>>perfectly but have just come across a subject that I'd have expected to
>>be suppressed and it wasn't.  The subject in question was:
>>BEST "PROOF" OF "HOLOCAUST GASSINGS" IS PHONY!
>>
>>I'd expected that the kill file line
>>:!s/=:^[^a-z]*$
>>would have suppressed a subject which included no lower-case  character
>>but the above is a counter-example.

>I also would
>have guessed that the regexp ^[^a-z]*$ would have caught the
>above subject since no character is in the range a-z.  My guess
>is that punctuation is treated differently.

TFM says that the equal sign, as in :!s/=:, means the matching is case-
insensitive, i.e. converts the subject to lower-case before matching.
Note that `*' means "zero or more", so this RE also matches null
subjects: if you don't want that behavior, use `+' instead (assuming
nn really implements all egrep RE features; I haven't tried this).
Therefore, what you really want is:

    :!s/:^[^a-z]+$

-- 
 Dave Wolfe   | 6501 William Cannon Dr. W. | (512) 891-3246
 Motorola SPS | Austin, TX  78735-8598     | dwolfe@pets.sps.mot.com
Technical Details
Message-ID: <dwolfe.761425645@pets.sps.mot.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmd.de!newsserver.jvnc.net!darwin.sura.net!howland.reston.ans.net!cs.utexas.edu!uunet!spsgate!mogate!risc.sps.mot.com!pets.sps.mot.com!dwolfe
References: <dlyons.761226723@unix1.tcd.ie> <2jrj0d$oua@nwfocus.wa.com>

Show Full Headers
Complete Article Headers
Message-ID: <dwolfe.761425645@pets.sps.mot.com>
Subject: Re: How to kill subject with only Capitals & Punctuation?
Date: Wed, 16 Feb 1994 19:07:25 +0000
From: dwolfe@pffft.sps.mot.com (Dave Wolfe)
References: <dlyons.761226723@unix1.tcd.ie> <2jrj0d$oua@nwfocus.wa.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmd.de!newsserver.jvnc.net!darwin.sura.net!howland.reston.ans.net!cs.utexas.edu!uunet!spsgate!mogate!risc.sps.mot.com!pets.sps.mot.com!dwolfe
Newsgroups: news.software.nn,comp.unix.questions
Organization: Motorola (Austin,TX)
Lines: 30
NNTP-Posting-Host: pffft.sps.mot.com