View Single Post
  #6   Report Post  
Posted to rec.crafts.metalworking
DoN. Nichols[_2_] DoN. Nichols[_2_] is offline
external usenet poster
 
Posts: 2,584
Default Need regex code for counting newsgroups

On 2013-08-17, Joe Gwinn wrote:
There was a thread some time ago on ways to kill postings with too many
cross-posts. Some of these methods involved regular expressions, most
likely counting commas in the newsgroups header. Can anyone provide a
pointer to the thread, or related threads?


The way I do it is based on the commas in the "Newgsgroups: "
header.

Two newgroups .*,.*
Three newsgroups .*,.*,.*
Four newsgroups .*,.*,.*,.*

Whe ".*" means any number of any characters.
',' means itself -- a plain old comma.

Exactly how you tell your newsreader to use those varies. I
would do something like "-10" for each one of those, so two newsgroups
would be -10, three would be -20, four (or more) would be -30, and set
the auto-kill threshold to -15. (Three is too many in cross-posting.) I
also use + scores on the "Subject: " header for the very few things
which I want to see which are cross-posted, such as the "What Is It"
weekly puzzle posting thread.

Enjoy,
DoN.

--
Remove oil spill source from e-mail
Email: | (KV4PH) Voice (all times): (703) 938-4564
(too) near Washington D.C. | http://www.d-and-d.com/dnichols/DoN.html
--- Black Holes are where God is dividing by zero ---