🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #242937

Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?

#242937
From: Mike Yetto
Date: Wed, 06 Oct 2010 17:05
100 lines
5326 bytes
BookWight <Bookwight@publicspam.com> writes and having writ moves on.
>Wandering along the edges of news.software.readers, I found the following 
>bit of electronic flotsam written by Mike Yetto <myetto1@nycap.invalid> 
>in news:slrn20101002104951.499.twooffive@may.eternal-september.org:

>> Gene E. Bloch <not-me@other.invalid> writes and having writ moves on.
>>>On Fri, 01 Oct 2010 08:05:06 -0400, Mike Yetto wrote:
>>>> 
>>>> How about starting with this...
>>>> 
>>>> Subject:= ([A-Z][~A-Z]*){n}
>>>> 
>>>> The intent is to look for a UC character optionally followed by
>>>> other characters n times.  The 'n' can be changed from an exact
>>>> number to a minimum with a comma.  
>>>> 
>> 
>>>Thanks for that, Mike. I was (justifiably, I say!) lazy about RTFM,
>>>since I'm not running xnews, but I though  my idea might be a good
>>>starting point for the OP.
>> 
>> This was simpler than I thought it would be (*if* it works) and I
>> really have to stop outwitting myself.
>> 
>>>If the OP is gone, so be it, but your detailed answer should help 
>others
>>>who *are* using xnews. And maybe the same idea will work for other
>>>newsreaders as well, mutatis mutandis.
>> 
>> This should work (or come close) with slrn as well and the
>> details were supplied so tweaking would be easier.  However, I
>> still think that just looking for a lower-case character would
>> eliminate a good number of spam posts.
>> 
>> Mike "regex: a parser for all seasons" Yetto

>I'm sorry I don't check into this group more often.
>I have, in fact, RTFM.  I've also read through several references on 
>regular expressions picked up from the e-book groups.  Too much info = 
>information overload = brain fart.  In response to one of the replies, I 
>have spent a day gathering examples of what I would like to filter out.

>It may well be that I need 2 regex expressions:

>#1.  for subject lines consisting of 20 or more capital letters & no 
>lowercase.

>examples:

>THE BEST IF YUM YUM YUM NZB FILES (~/2)

>WEB  PRIVACY,  AN0N EMAIL, WEB SURFING, FILE SHARING, IRC, USENET -  
>EVERYTHING

>MESMARISING VIDEOS&HOT PHOTOS

>PARIS COLLEGE GIRLS WITHOUT DRESS IMAGES.


>#2. Subject lines containing 20+ capital letters & unknown mixture of 
>lower case.

>examples:

>(WWW.IOFFERKICKS.COM)nike shoes:$32,handbag:$35,NFL:$20,jean:$30,UGG  
>boot:$50(FREE SHIPPING)

>## DONT PAY FOR USENET ## - An0nYm0uS, Unlimited, all alt.binaries groups 
>included - Total Usenet Anonymity

>0NLINE AN0NYMITY - PRIVACY T00LS - AN0NYMOUS USENET -  AN0N VISAS and 
>MORE

>||||| FREE USENET ACCESS ||| - An0nYm0uS, Unlimited, all alt.binaries 
>groups included - Total Usenet Anonymity

>WHOOO MAN DAS IST GOOT EATEN - "SAUSAGEN UND EGGEN.PDF" 335.8 kBytes yEnc

>>> WHY PAY FOR USENET?? << - FREE Anonymous Usenet, ALL Binaries groups, 
>UNLIMITED Downlaods, COMPLETE Anonymity

>as before, all helpful comments welcome.

I gave this some more thought and decided that the example I gave
would catch everyone of your examples had I used the correct
syntax.


This will catch any subject with 20 or more uppercase characters.

#v+
[*]
Score: =-9999
Subject:= ([A-Z][^A-Z]*){20}
#v-

Mike "tweak to taste" Yetto
-- 
In theory, theory and practice are the same.
In practice they are not.
Technical Details
Message-ID: <slrn20101006130015.371.twooffive@may.eternal-september.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.news-service.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
References: <Xns9E0350120FCD5bookwight@207.246.207.159> <Xns9E03730466944VeebleFetzer@216.250.188.141> <slrn20100930130743.632.twooffive@may.eternal-september.org> <hzp2g19rrxa3$.1qs9z2e0o64o9.dlg@40tude.net> <slrn20100930182657.380.twooffive@may.eternal-september.org> <eby8yvz4ebfg$.12vrytnc6gfn6$.dlg@40tude.net> <slrn20101001075806.483.twooffive@may.eternal-september.org> <l8kj04nq5y89.p0vk321749dn$.dlg@40tude.net> <slrn20101002104951.499.twooffive@may.eternal-september.org> <Xns9E07862949254bookwight@207.246.207.168>

Show Full Headers
Complete Article Headers
Message-ID: <slrn20101006130015.371.twooffive@may.eternal-september.org>
Subject: Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
Date: Wed, 06 Oct 2010 13:05:38 -0400
From: Mike Yetto <myetto1@nycap.invalid>
References: <Xns9E0350120FCD5bookwight@207.246.207.159> <Xns9E03730466944VeebleFetzer@216.250.188.141> <slrn20100930130743.632.twooffive@may.eternal-september.org> <hzp2g19rrxa3$.1qs9z2e0o64o9.dlg@40tude.net> <slrn20100930182657.380.twooffive@may.eternal-september.org> <eby8yvz4ebfg$.12vrytnc6gfn6$.dlg@40tude.net> <slrn20101001075806.483.twooffive@may.eternal-september.org> <l8kj04nq5y89.p0vk321749dn$.dlg@40tude.net> <slrn20101002104951.499.twooffive@may.eternal-september.org> <Xns9E07862949254bookwight@207.246.207.168>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.news-service.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
Newsgroups: news.software.readers
Organization: slrn Mafia / Xnews Tong (emeritus)
Lines: 100
Injection-Date: Wed, 6 Oct 2010 17:12:08 +0000 (UTC)
Injection-Info: may.eternal-september.org;
 posting-host="hfjwMW7CmKY4MWfbpfLtVw";
 logging-data="15510"; mail-complaints-to="abuse@eternal-september.org";
 posting-account="U2FsdGVkX18XDEQF33YNtvqGmtLtxouKNFDtCbz5BMU="
User-Agent: slrn/pre1.0.0-24/co (Kubuntu 10.04; 64bit)
X-The-Usenet-Improvement-Project: http://twovoyagers.com/improve-usenet.org/
X-No-Bananas: Yes
Cancel-Lock: sha1:uOB2qFFHCuFcrNAJDjkCGVutRog=
 sha1:X+Gp86wo4bj1h5sQKgClM1n0ujk=
X-Original-Bytes: 5072