🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nn
7 messages
7 total messages Started by Bill Wohler Thu, 16 Jan 1997 00:00
Re: regexp to kill posts in ALL CAPS
#8351
Author: Bill Wohler
Date: Thu, 16 Jan 1997 00:00
21 lines
1221 bytes
"Paul J. Lucas" <pjl@no-junk-mail.org> writes:
>	Observation: Posts with subjects in ALL CAPITAL LETTERS are
>	never worth reading.
>
>		:!s/:^[^a-z][^a-z]*$

  Good idea.  What you mean is to look for all caps, some punctuation
  and white space.  Thus:

	:!s/:^[A-Z.,!$ 	]+$

  If anyone would be kind enough to drop this search on comp and see if
  any false matches came up, we could modify it as necessary.
-- 

Bill Wohler <wohler@newt.com>   ph: +1-415-854-1857  fax: +1-415-854-3195
Say it with MIME.  Maintainer of comp.mail.mh and news.software.nn FAQs.
If you're passed on the right, you're in the wrong lane.

Re: regexp to kill posts in ALL CAPS
#8359
Author: Kyler Laird
Date: Fri, 17 Jan 1997 00:00
31 lines
1450 bytes
"Paul J. Lucas" <pjl@no-junk-mail.org> writes:

>>  Good idea.  What you mean is to look for all caps, some punctuation
>>  and white space.  Thus:

>>  :!s/:^[A-Z.,!$  ]+$

Ick!  That strings is going to get really long...

>   Right, which is exactly the same thing as saying "no lower case
>   letters."

No, it's not.  "A-Z.,!$ a-z" does not cover all of the
characters that can show up in a Subject: line.  '&' and
'-' are commonly used.  How about "SAVE 40% ON YOUR PHONE
BILLS!"?

A much simpler approach is to say what you mean: "match
all subjects composed entirely of characters which are
not lower case letters" or
	:!s/=:^[^a-z]*$

This works beautifully for me.  I wonder how long it will
take the spammers to add lowercase junk?
	Subject: <blink>CLICK HERE!</blink>
("click here" is already in my kill file...)

--kyler

Re: regexp to kill posts in ALL CAPS
#8360
Author: Kristian Köhntopp
Date: Fri, 17 Jan 1997 00:00
33 lines
1673 bytes
"Paul J. Lucas" <pjl@no-junk-mail.org> writes:
>	The nn documentation doesn't say which REs are accepted:
>	regular (grep) or extended (egrep).

The nn regular expression mechanism is severely
underdocumented. Not even the source reveals which regexps are
accepted.

Christian Weisgerber suggested

:!s/=:^[^a-z]*$

as a regular expression for an nn killfile (*1), he later (*2)
improved that to be

:!s/=:^[^a-z][^a-z]*$

I seem to remember an article by him where he explained nn
regular expressions in a more detailed way, but it seems that I
haven't saved that posting. Please contact Christian 'naddy'
Weisgerber, naddy@mips.pfalz.de for details.

Kristian

(*1) <52qpa5$dmp@mips.pfalz.de>, 1 Oct 1996 11:46:45 +0200
(*2) <53heac$g8k@mips.pfalz.de>, 10 Oct 1996 02:00:12 +0200
--
Kristian Koehntopp, Wassilystrasse 30, 24113 Kiel, +49 431 688897
"> Ich sollte was gegen meine USENET-Sucht tun....
 * roe empfiehlt Kris NNTP-Pflaster." -- Neulich auf #arnooo

Re: regexp to kill posts in ALL CAPS
#8369
Author: Bill Wohler
Date: Fri, 17 Jan 1997 00:00
15 lines
1153 bytes
  Kristian forwarded the following but I wanted to explain why it works:

>:!s/=:^[^a-z][^a-z]*$

  This differs from the original by one character: =.  Normally, matches
  are case insensitive--the equals makes them case sensitive again which
  is what we want.
-- 

Bill Wohler <wohler@newt.com>   ph: +1-415-854-1857  fax: +1-415-854-3195
Say it with MIME.  Maintainer of comp.mail.mh and news.software.nn FAQs.
If you're passed on the right, you're in the wrong lane.

Re: regexp to kill posts in ALL CAPS
#8366
Author: Cliff Heller
Date: Sat, 18 Jan 1997 00:00
20 lines
1395 bytes
In <5boic8$6gl@samba.rahul.net> Bill Wohler <wohler@newt.com> writes:

>>:!s/=:^[^a-z][^a-z]*$

>  This differs from the original by one character: =.  Normally, matches
>  are case insensitive--the equals makes them case sensitive again which
>  is what we want.

This is a key piece that was missing from the documentation the last time I
looked.  I remember mention of case insensitivity unless specified
otherwise, but no mention of the '=' sign.  Very critical.

-- 
    / \      Left Reverend Nigh Invulnerable            fnord@panix.com
   /<0>\     Church of the Subverted Paradigm
  /     \                                               God Plays Dice!
 /_______\    --> FIVE TONS OF FLAX <--          Death To All Fanatics! 

Re: regexp to kill posts in ALL CAPS
#8386
Author: Kyler Laird
Date: Mon, 20 Jan 1997 00:00
28 lines
1209 bytes
"Paul J. Lucas" <pjl@no-junk-mail.org> writes:

>>>>  :!s/:^[A-Z.,!$  ]+$

>>Ick!  That strings is going to get really long...

>>>   Right, which is exactly the same thing as saying "no lower case
>>>   letters."

>>No, it's not.

>	Yes, it is.  "No lower case letters" == "all characters that
>	are either uppoer-case letters or any other character including
>	all punctuation."

There is more punctuation than ".,!$ ".

>>	:!s/=:^[^a-z]*$

>	That is what I said.

Not above.  Are you reading the same quotes that
I'm quoting?

--kyler

Re: regexp to kill posts in ALL CAPS
#8394
Author: Christian Weisgerber
Date: Mon, 27 Jan 1997 00:00
40 lines
1921 bytes
KRIS@KOEHNTOPP.DE (Kristian Koehntopp) writes:

> The nn regular expression mechanism is severely
> underdocumented. Not even the source reveals which regexps are
> accepted.

Check out regexp.c.
nn uses a slightly modified version of Henry Spencer's 1986 regexp
package. You can glean the accepted operators from regatom():

    ^       beginning of line
    $       end of line
    .       any character
    [ ]     character class
            including:
            ^   complement class
            -   range
    ( | )   alternatives
    *       match 0 or more times
    \<      start of word  (nn extension)
    \>      end of word  (nn extension)


BTW, there are at least two newgroups where killing subjects in all caps
is not desirable:
- comp.risks, where all subjects are of the "RISKS DIGEST <number>"
  type, and
- rec.arts.movies.reviews, where reviewers usually spell movie titles in
  all caps, and this habit carries over to the subject line, too.

Ironically, both groups are moderated and well worth reading if you are
interested in their respective topics.

-- 
Christian 'naddy' Weisgerber                         naddy@mips.pfalz.de
  See another pointless homepage at <URL:http://home.pages.de/~naddy/>.
 -- currently reading: A.E. van Vogt, The Voyage of the Space Beagle --

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