🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
20 messages
20 total messages Started by BookWight Thu, 30 Sep 2010 14:52
[Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242883
Author: BookWight
Date: Thu, 30 Sep 2010 14:52
8 lines
1104 bytes
Hi -

I need help; I'm trying to filter out the subject headers which have 'x' 
amount of capital letters in the subject.

All helpful suggestions welcome

TIA
Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242875
Author: Bert Hyman
Date: Thu, 30 Sep 2010 16:18
21 lines
1655 bytes
In news:Xns9E0350120FCD5bookwight@207.246.207.159 BookWight
<Bookwight@publicspam.com> wrote: 

> Hi -
> 
> I need help; I'm trying to filter out the subject headers which have
> 'x' amount of capital letters in the subject.
> 
> All helpful suggestions welcome

If there are no spaces, reading TFM suggests this:

[A-Z]{x}

If there are spaces or other characters, things get more complicated.

See the section "Regular expression", "3) Quantifiers (match how many
times)" 

-- 
Bert Hyman	St. Paul, MN	bert@iphouse.com
Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242876
Author: Mike Yetto
Date: Thu, 30 Sep 2010 17:13
38 lines
2573 bytes
Bert Hyman <bert@iphouse.com> writes and having writ moves on.
>In news:Xns9E0350120FCD5bookwight@207.246.207.159 BookWight
><Bookwight@publicspam.com> wrote: 

>> Hi -
>> 
>> I need help; I'm trying to filter out the subject headers which have
>> 'x' amount of capital letters in the subject.
>> 
>> All helpful suggestions welcome

>If there are no spaces, reading TFM suggests this:

>[A-Z]{x}

>If there are spaces or other characters, things get more complicated.

>See the section "Regular expression", "3) Quantifiers (match how many
>times)" 

A simpler approach would be to look for at least one lower-case
character.  To do this you need to set the regex to case
sensitive with an = sign.  Then look for [a-z] and negate the
expression.

#v+
[*]
Score:: -9999
  ~Subject:= [a-z]
#v-

Or you can look for a minimum number of lower-case characters
greater than one with the {n} construct.

Mike "answer too hard? change the question" Yetto 
-- 
In theory, theory and practice are the same.
In practice they are not.
Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242877
Author: Gene E. Bloch
Date: Thu, 30 Sep 2010 19:01
52 lines
3055 bytes
On Thu, 30 Sep 2010 13:13:54 -0400, Mike Yetto wrote:

> Bert Hyman <bert@iphouse.com> writes and having writ moves on.
>>In news:Xns9E0350120FCD5bookwight@207.246.207.159 BookWight
>><Bookwight@publicspam.com> wrote: 
> 
>>> Hi -
>>> 
>>> I need help; I'm trying to filter out the subject headers which have
>>> 'x' amount of capital letters in the subject.
>>> 
>>> All helpful suggestions welcome
> 
>>If there are no spaces, reading TFM suggests this:
> 
>>[A-Z]{x}
> 
>>If there are spaces or other characters, things get more complicated.
> 
>>See the section "Regular expression", "3) Quantifiers (match how many
>>times)" 
> 
> A simpler approach would be to look for at least one lower-case
> character.  To do this you need to set the regex to case
> sensitive with an = sign.  Then look for [a-z] and negate the
> expression.
> 
> #v+
> [*]
> Score:: -9999
>   ~Subject:= [a-z]
> #v-
> 
> Or you can look for a minimum number of lower-case characters
> greater than one with the {n} construct.
> 
> Mike "answer too hard? change the question" Yetto

As I read it, that's not quite what he asked.

I would say he needs a way to count UC letters, and score it if the
number is x or more. Or exactly x; he was possibly ambiguous...

All I can think of is start with Subject:=[A-Z][~A-Z]+
and concatenate enough such selectors (*both* sets of brackets) to the
above to make x of them.

I don't have xnews handy, so I'm guessing about the syntax. I mean
[~A-Z]+ to stand for 1 or more characters that aren't UC letters.

-- 
Gene E. Bloch (Stumbling Bloch)
Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242881
Author: Mike Yetto
Date: Thu, 30 Sep 2010 22:31
65 lines
3732 bytes
Gene E. Bloch <not-me@other.invalid> writes and having writ moves on.
>On Thu, 30 Sep 2010 13:13:54 -0400, Mike Yetto wrote:

>> Bert Hyman <bert@iphouse.com> writes and having writ moves on.
>>>In news:Xns9E0350120FCD5bookwight@207.246.207.159 BookWight
>>><Bookwight@publicspam.com> wrote: 
>> 
>>>> Hi -
>>>> 
>>>> I need help; I'm trying to filter out the subject headers which have
>>>> 'x' amount of capital letters in the subject.
>>>> 
>>>> All helpful suggestions welcome
>> 
>>>If there are no spaces, reading TFM suggests this:
>> 
>>>[A-Z]{x}
>> 
>>>If there are spaces or other characters, things get more complicated.
>> 
>>>See the section "Regular expression", "3) Quantifiers (match how many
>>>times)" 
>> 
>> A simpler approach would be to look for at least one lower-case
>> character.  To do this you need to set the regex to case
>> sensitive with an = sign.  Then look for [a-z] and negate the
>> expression.
>> 
>> #v+
>> [*]
>> Score:: -9999
>>   ~Subject:= [a-z]
>> #v-
>> 
>> Or you can look for a minimum number of lower-case characters
>> greater than one with the {n} construct.
>> 
>> Mike "answer too hard? change the question" Yetto

>As I read it, that's not quite what he asked.

>I would say he needs a way to count UC letters, and score it if the
>number is x or more. Or exactly x; he was possibly ambiguous...

>All I can think of is start with Subject:=[A-Z][~A-Z]+
>and concatenate enough such selectors (*both* sets of brackets) to the
>above to make x of them.

>I don't have xnews handy, so I'm guessing about the syntax. I mean
>[~A-Z]+ to stand for 1 or more characters that aren't UC letters.

I assumed the OP wanted to score on shouted subject lines as this
is a hallmark of spam.  If the requirement is a specific or
minimum number of upper case characters we'll need some more
information.

Should the UC characters be contiguous?  Can they be separated by
whitespace?  If so, do the whitespace characters count?  If they
can be interspersed with lower case characters or numbers this
could get very tricky.

Mike "awaiting the new specs" Yetto
-- 
In theory, theory and practice are the same.
In practice they are not.
Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242882
Author: Gene E. Bloch
Date: Fri, 01 Oct 2010 00:03
83 lines
4563 bytes
On Thu, 30 Sep 2010 18:31:40 -0400, Mike Yetto wrote:

> Gene E. Bloch <not-me@other.invalid> writes and having writ moves on.
>>On Thu, 30 Sep 2010 13:13:54 -0400, Mike Yetto wrote:
> 
>>> Bert Hyman <bert@iphouse.com> writes and having writ moves on.
>>>>In news:Xns9E0350120FCD5bookwight@207.246.207.159 BookWight
>>>><Bookwight@publicspam.com> wrote: 
>>> 
>>>>> Hi -
>>>>> 
>>>>> I need help; I'm trying to filter out the subject headers which have
>>>>> 'x' amount of capital letters in the subject.
>>>>> 
>>>>> All helpful suggestions welcome
>>> 
>>>>If there are no spaces, reading TFM suggests this:
>>> 
>>>>[A-Z]{x}
>>> 
>>>>If there are spaces or other characters, things get more complicated.
>>> 
>>>>See the section "Regular expression", "3) Quantifiers (match how many
>>>>times)" 
>>> 
>>> A simpler approach would be to look for at least one lower-case
>>> character.  To do this you need to set the regex to case
>>> sensitive with an = sign.  Then look for [a-z] and negate the
>>> expression.
>>> 
>>> #v+
>>> [*]
>>> Score:: -9999
>>>   ~Subject:= [a-z]
>>> #v-
>>> 
>>> Or you can look for a minimum number of lower-case characters
>>> greater than one with the {n} construct.
>>> 
>>> Mike "answer too hard? change the question" Yetto
> 
>>As I read it, that's not quite what he asked.
> 
>>I would say he needs a way to count UC letters, and score it if the
>>number is x or more. Or exactly x; he was possibly ambiguous...
> 
>>All I can think of is start with Subject:=[A-Z][~A-Z]+
>>and concatenate enough such selectors (*both* sets of brackets) to the
>>above to make x of them.
> 
>>I don't have xnews handy, so I'm guessing about the syntax. I mean
>>[~A-Z]+ to stand for 1 or more characters that aren't UC letters.
> 
> I assumed the OP wanted to score on shouted subject lines as this
> is a hallmark of spam.  If the requirement is a specific or
> minimum number of upper case characters we'll need some more
> information.
> 
> Should the UC characters be contiguous?  Can they be separated by
> whitespace?  If so, do the whitespace characters count?  If they
> can be interspersed with lower case characters or numbers this
> could get very tricky.
> 
> Mike "awaiting the new specs" Yetto

Meantime, what I wrote isn't even what I should've written :-)

I'm assuming that the OP wants to find x characters that are uppercase,
but which might or might not be contiguous. 

Given that, the plus sign I used should be a * or dot (as said above, I
don't recall what xnews uses), to indicate 0 or more non-uppercase
characters. 

If xnews allows it, maybe there's a way to indicate x instances of my
regex, like (regex)12, when x is 12, instead of writing it 12 times.

If my assumption is not what the drive-by OP wanted, all bets are off.

Gene "not necessarily one to gamble" Bloch

-- 
Gene E. Bloch (Stumbling Bloch)
Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242884
Author: Mike Yetto
Date: Fri, 01 Oct 2010 12:05
92 lines
5042 bytes
Gene E. Bloch <not-me@other.invalid> writes and having writ moves on.
>On Thu, 30 Sep 2010 18:31:40 -0400, Mike Yetto wrote:

>> Gene E. Bloch <not-me@other.invalid> writes and having writ moves on.
>>>On Thu, 30 Sep 2010 13:13:54 -0400, Mike Yetto wrote:
>> 
>>>> Bert Hyman <bert@iphouse.com> writes and having writ moves on.
>>>>>In news:Xns9E0350120FCD5bookwight@207.246.207.159 BookWight
>>>>><Bookwight@publicspam.com> wrote: 
>>>> 
>>>>>> Hi -
>>>>>> 
>>>>>> I need help; I'm trying to filter out the subject headers which have
>>>>>> 'x' amount of capital letters in the subject.
>>>>>> 
>>>>>> All helpful suggestions welcome
>>>> 
>>>>>If there are no spaces, reading TFM suggests this:
>>>> 
>>>>>[A-Z]{x}
>>>> 
>>>>>If there are spaces or other characters, things get more complicated.
>>>> 
>>>>>See the section "Regular expression", "3) Quantifiers (match how many
>>>>>times)" 
>>>> 
>>>> A simpler approach would be to look for at least one lower-case
>>>> character.  To do this you need to set the regex to case
>>>> sensitive with an = sign.  Then look for [a-z] and negate the
>>>> expression.
>>>> 
>>>> #v+
>>>> [*]
>>>> Score:: -9999
>>>>   ~Subject:= [a-z]
>>>> #v-
>>>> 
>>>> Or you can look for a minimum number of lower-case characters
>>>> greater than one with the {n} construct.
>>>> 
>>>> Mike "answer too hard? change the question" Yetto
>> 
>>>As I read it, that's not quite what he asked.
>> 
>>>I would say he needs a way to count UC letters, and score it if the
>>>number is x or more. Or exactly x; he was possibly ambiguous...
>> 
>>>All I can think of is start with Subject:=[A-Z][~A-Z]+
>>>and concatenate enough such selectors (*both* sets of brackets) to the
>>>above to make x of them.
>> 
>>>I don't have xnews handy, so I'm guessing about the syntax. I mean
>>>[~A-Z]+ to stand for 1 or more characters that aren't UC letters.
>> 
>> I assumed the OP wanted to score on shouted subject lines as this
>> is a hallmark of spam.  If the requirement is a specific or
>> minimum number of upper case characters we'll need some more
>> information.
>> 
>> Should the UC characters be contiguous?  Can they be separated by
>> whitespace?  If so, do the whitespace characters count?  If they
>> can be interspersed with lower case characters or numbers this
>> could get very tricky.
>> 
>> Mike "awaiting the new specs" Yetto

>Meantime, what I wrote isn't even what I should've written :-)

>I'm assuming that the OP wants to find x characters that are uppercase,
>but which might or might not be contiguous. 

>Given that, the plus sign I used should be a * or dot (as said above, I
>don't recall what xnews uses), to indicate 0 or more non-uppercase
>characters. 

>If xnews allows it, maybe there's a way to indicate x instances of my
>regex, like (regex)12, when x is 12, instead of writing it 12 times.

>If my assumption is not what the drive-by OP wanted, all bets are off.

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.  

Mike "testing is left as an exercise for the reader" Yetto 
-- 
In theory, theory and practice are the same.
In practice they are not.
Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242885
Author: Gene E. Bloch
Date: Fri, 01 Oct 2010 21:23
102 lines
5461 bytes
On Fri, 01 Oct 2010 08:05:06 -0400, Mike Yetto wrote:

> Gene E. Bloch <not-me@other.invalid> writes and having writ moves on.
>>On Thu, 30 Sep 2010 18:31:40 -0400, Mike Yetto wrote:
> 
>>> Gene E. Bloch <not-me@other.invalid> writes and having writ moves on.
>>>>On Thu, 30 Sep 2010 13:13:54 -0400, Mike Yetto wrote:
>>> 
>>>>> Bert Hyman <bert@iphouse.com> writes and having writ moves on.
>>>>>>In news:Xns9E0350120FCD5bookwight@207.246.207.159 BookWight
>>>>>><Bookwight@publicspam.com> wrote: 
>>>>> 
>>>>>>> Hi -
>>>>>>> 
>>>>>>> I need help; I'm trying to filter out the subject headers which have
>>>>>>> 'x' amount of capital letters in the subject.
>>>>>>> 
>>>>>>> All helpful suggestions welcome
>>>>> 
>>>>>>If there are no spaces, reading TFM suggests this:
>>>>> 
>>>>>>[A-Z]{x}
>>>>> 
>>>>>>If there are spaces or other characters, things get more complicated.
>>>>> 
>>>>>>See the section "Regular expression", "3) Quantifiers (match how many
>>>>>>times)" 
>>>>> 
>>>>> A simpler approach would be to look for at least one lower-case
>>>>> character.  To do this you need to set the regex to case
>>>>> sensitive with an = sign.  Then look for [a-z] and negate the
>>>>> expression.
>>>>> 
>>>>> #v+
>>>>> [*]
>>>>> Score:: -9999
>>>>>   ~Subject:= [a-z]
>>>>> #v-
>>>>> 
>>>>> Or you can look for a minimum number of lower-case characters
>>>>> greater than one with the {n} construct.
>>>>> 
>>>>> Mike "answer too hard? change the question" Yetto
>>> 
>>>>As I read it, that's not quite what he asked.
>>> 
>>>>I would say he needs a way to count UC letters, and score it if the
>>>>number is x or more. Or exactly x; he was possibly ambiguous...
>>> 
>>>>All I can think of is start with Subject:=[A-Z][~A-Z]+
>>>>and concatenate enough such selectors (*both* sets of brackets) to the
>>>>above to make x of them.
>>> 
>>>>I don't have xnews handy, so I'm guessing about the syntax. I mean
>>>>[~A-Z]+ to stand for 1 or more characters that aren't UC letters.
>>> 
>>> I assumed the OP wanted to score on shouted subject lines as this
>>> is a hallmark of spam.  If the requirement is a specific or
>>> minimum number of upper case characters we'll need some more
>>> information.
>>> 
>>> Should the UC characters be contiguous?  Can they be separated by
>>> whitespace?  If so, do the whitespace characters count?  If they
>>> can be interspersed with lower case characters or numbers this
>>> could get very tricky.
>>> 
>>> Mike "awaiting the new specs" Yetto
> 
>>Meantime, what I wrote isn't even what I should've written :-)
> 
>>I'm assuming that the OP wants to find x characters that are uppercase,
>>but which might or might not be contiguous. 
> 
>>Given that, the plus sign I used should be a * or dot (as said above, I
>>don't recall what xnews uses), to indicate 0 or more non-uppercase
>>characters. 
> 
>>If xnews allows it, maybe there's a way to indicate x instances of my
>>regex, like (regex)12, when x is 12, instead of writing it 12 times.
> 
>>If my assumption is not what the drive-by OP wanted, all bets are off.
> 
> 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.  
> 
> Mike "testing is left as an exercise for the reader" Yetto

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.

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.

-- 
Gene E. Bloch (Stumbling Bloch)
Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242891
Author: Mike Yetto
Date: Sat, 02 Oct 2010 14:57
32 lines
3167 bytes
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
-- 
In theory, theory and practice are the same.
In practice they are not.
Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242928
Author: BookWight
Date: Mon, 04 Oct 2010 20:11
109 lines
4380 bytes
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.



























Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242930
Author: Gene E. Bloch
Date: Mon, 04 Oct 2010 22:40
42 lines
3367 bytes
On Sat, 02 Oct 2010 10:57:30 -0400, Mike Yetto wrote:

> 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

With the reply from the OP to your post, there are two things I can say:

1. He made it clear that the one-LC-letter test will not work in his
case.

2. I am glad to withdraw my guess about a drive-by post. I apologize,
BookWight, for being so hasty.

-- 
Gene E. Bloch (Stumbling Bloch)
Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242937
Author: 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.
Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242938
Author: BookWight
Date: Wed, 06 Oct 2010 18:50
42 lines
2715 bytes
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:slrn20101006130015.371.twooffive@may.eternal-september.org: 

> 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: 
> 
>>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

mike -

I tried editing the score file with your offered expression, but got the 
2 following errors:

1.  Perle: Nothing to repeat

2.  Invalid group expression "]" at line 6


I counted the number of left & right (parantheses, brackets, curly 
brackets) rather carefully . . .

I (rather cautiously) invite comments
Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242939
Author: BookWight
Date: Wed, 06 Oct 2010 18:54
13 lines
1955 bytes
Wandering along the edges of news.software.readers, I found the following 
bit of electronic flotsam written by "Gene E. Bloch" <not-me@other.invalid> 
in news:1x5d7uaj2ttsr.12bknf4lmmjey.dlg@40tude.net:

> With the reply from the OP to your post, there are two things I can say:
> 

> 2. I am glad to withdraw my guess about a drive-by post. I apologize,
> BookWight, for being so hasty.
> 

no apology needed; it was a reasonable assumption, given the infrequency of 
my checking into this newsgroup.
Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242940
Author: Steve Crook
Date: Wed, 06 Oct 2010 19:21
15 lines
2026 bytes
On Sat, 02 Oct 2010 10:57:30 -0400, Mike Yetto wrote in
Message-Id: <slrn20101002104951.499.twooffive@may.eternal-september.org>:

> 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.

I agree Mike, that's also how Cleanfeed scores against all-caps
subjects:-

$score .= "!!SubNoLC" if $hdr{Subject} !~ /[a-z]/;

The problem with matching all uppercase is that punctuation,
whitespace, etc all need to be considered.
Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242942
Author: John Wunderlich
Date: Wed, 06 Oct 2010 23:32
56 lines
3327 bytes
BookWight <Bookwight@publicspam.com> wrote in
news:Xns9E09787B021D7bookwight@207.246.207.169: 

> 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:slrn20101006130015.371.twooffive@may.eternal-september.org: 
> 
>> 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:
>> 
>>> 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
> 
> mike -
> 
> I tried editing the score file with your offered expression, but
> got the 2 following errors:
> 
> 1.  Perle: Nothing to repeat
> 
> 2.  Invalid group expression "]" at line 6
> 
> 
> I counted the number of left & right (parantheses, brackets, curly
> brackets) rather carefully . . .
> 
> I (rather cautiously) invite comments

Hmmm...
If I leave out the "#v+" and "#v-" in the above and fixing the error 
where it should be "Subject=" instead of "Subject:="

...It works just great for me.
Tested in alt.test.

-- John

Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242944
Author: andrew
Date: Thu, 07 Oct 2010 00:25
12 lines
2224 bytes
On 2010-10-06, John Wunderlich <jwunderlich@lycos.com> wrote:

> If I leave out the "#v+" and "#v-" [...]

These are the so-called 'verbatim' marks and are unique to slrn, as far
as I know:

http://slrn.sourceforge.net/docs/slrn-manual-6.html#process_verbatim_marks 

Andrew
-- 
Do you think that's air you're breathing?
Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242946
Author: Mike Yetto
Date: Thu, 07 Oct 2010 12:00
63 lines
3692 bytes
John Wunderlich <jwunderlich@lycos.com> writes and having writ moves on.
>BookWight <Bookwight@publicspam.com> wrote in
>news:Xns9E09787B021D7bookwight@207.246.207.169: 

>> 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:slrn20101006130015.371.twooffive@may.eternal-september.org: 
>> 
>>> 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:
>>> 
>>>> 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
>> 
>> mike -
>> 
>> I tried editing the score file with your offered expression, but
>> got the 2 following errors:
>> 
>> 1.  Perle: Nothing to repeat
>> 
>> 2.  Invalid group expression "]" at line 6
>> 
>> 
>> I counted the number of left & right (parantheses, brackets, curly
>> brackets) rather carefully . . .
>> 
>> I (rather cautiously) invite comments

>Hmmm...
>If I leave out the "#v+" and "#v-" in the above and fixing the error 
>where it should be "Subject=" instead of "Subject:="

So, the part I tested with grep worked just fine, but something
I added for the score file screwed it up.

>...It works just great for me.
>Tested in alt.test.

Thanks for that.

Mike "I should stop when I'm done" Yetto
-- 
In theory, theory and practice are the same.
In practice they are not.
Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242948
Author: Mike Yetto
Date: Thu, 07 Oct 2010 12:03
23 lines
2770 bytes
Steve Crook <steve@mixmin.net> writes and having writ moves on.
>On Sat, 02 Oct 2010 10:57:30 -0400, Mike Yetto wrote in
>Message-Id: <slrn20101002104951.499.twooffive@may.eternal-september.org>:

>> 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.

>I agree Mike, that's also how Cleanfeed scores against all-caps
>subjects:-

>$score .= "!!SubNoLC" if $hdr{Subject} !~ /[a-z]/;

>The problem with matching all uppercase is that punctuation,
>whitespace, etc all need to be considered.

Exactly, and I considered all of it *not uppercase*.

Mike "the lazy man finds the easy way" Yetto
-- 
In theory, theory and practice are the same.
In practice they are not.
Re: [Xnews] Looking for regex help - 20 CAPITAL letters in subject header?
#242949
Author: MartinS
Date: Thu, 07 Oct 2010 13:48
8 lines
1970 bytes
Mike Yetto <myetto1@nycap.invalid> wrote:

> Mike "I should stop when I'm done" Yetto

Yes, quit while you're ahead.  ;-)

-- 
Martin S.
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