Article View: news.software.readers
Article #249301Re: [Xnews] score file question
From: Mike Dee
Date: Sat, 17 Mar 2012 01:10
Date: Sat, 17 Mar 2012 01:10
77 lines
4468 bytes
4468 bytes
Gene E. Bloch wrote: > On 3/16/2012, Gene E. Bloch posted: >> On 3/16/2012, Mike Dee posted: >>> Gene E. Bloch wrote: > >>>> How does your filter respond if the first, or maybe I mean the >>>> only, character of the subject is lower case? > >>> If the subject was, for example: > >>> HELP!!!! MY KEYBOARD KEePS JAMMING INTERMITTEDLY IN uPPEr >>> CASE!!!!! > >>> The filter would trigger on the 1st lower case letter (the "e" >>> in "KEePS" in the above example) - It wouldn't seek past that >>> point because its test is to find one lower case letter (and not >>> kill it if it finds one). > >> OK. > >> I'm rusty on REs in general, and I haven't tried it in Xnews for >> a very long time, so I was wondering if your RE would respond >> only to a post whose subject is a single lower case character. I >> don't have Xnews installed to try it for myself. > >> As a reminder, your RE was this: >> "~Subject= [a-z]" > >> which seems to me to say "any Subject which is not a single >> character consisting of one of the letters a-z". > > I should have said "seems ... to say" in the past tense, i.e., > s/seems/seemed/ > > Between what your wrote above and other posts in this thread, I > can only say that "I'm rusty on REs" is overly optimistic on my > part. I'm more than a little rusty. But, yes, the score rule will pick up on a single lower case character (the 1st one it finds) and stop running at that point as it has then "done its job". The example in the Xnews scoring.txt file is "~Subject= .*[a-z]" If that runs over the Subject string: HELP!!!! MY KEYBOARD KEePS JAMMING INTERMITTEDLY IN uPPEr CASE!!!!! It would return: "HELP!!!! MY KEYBOARD KEePS JAMMING INTERMITTEDLY IN uPPEr" Before the regex ran its course and stopped running. If instead you use the score rule "~Subject= [a-z]" on the same string, it would stop running upon locating the 1st lower case character, and in this example it would return "e" because it only needs to find a single lower-case character. If the Subject was an unlikely but possible single "a" for example, both "~Subject= .*[a-z]" & "~Subject= [a-z]" would get exactly the same result, and trigger on that single lower case "a". By using "~Subject= .*[a-z]", it seeks out all of the lower case characters in a string and doesn't stop until it locates the last lower-case character in that string (and includes all of the other characters before and inbetween). If there was a single lower-case character in that string it would trigger and stop running at that point. Which is what "~Subject= [a-z]" does anyway, without needing to locate other lower case characters nor does it have to look for and return the results of ".*" while doing so. So to me, "~Subject= .*[a-z]" has become redundant. I now prefer to use "~Subject= [a-z]". -- dee
Technical Details
Message-ID:
<XnsA01990225C008mikedee@emteedee.invalid>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!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mailReferences:
<XnsA01888C1FC5Amikedee@emteedee.invalid> <9sfhfcFm5nU1@mid.individual.net> <XnsA0195228D73mikedee@emteedee.invalid> <9shseqFm2oU1@mid.individual.net> <9shtckFsrdU1@mid.individual.net>Show Full Headers
Complete Article Headers
Message-ID: <XnsA01990225C008mikedee@emteedee.invalid>
Subject: Re: [Xnews] score file question
Date: Sat, 17 Mar 2012 01:10:02 +0000
From: Mike Dee <mikedee@emteedee.invalid>
References: <XnsA01888C1FC5Amikedee@emteedee.invalid> <9sfhfcFm5nU1@mid.individual.net> <XnsA0195228D73mikedee@emteedee.invalid> <9shseqFm2oU1@mid.individual.net> <9shtckFsrdU1@mid.individual.net>
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!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
Newsgroups: news.software.readers
Organization: Poor Boy
Lines: 77
Mime-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 17 Mar 2012 01:10:02 +0000 (UTC)
Injection-Info: mx04.eternal-september.org;
posting-host="0unxBQcXNunh5zvM39rzxQ";
logging-data="23647"; mail-complaints-to="abuse@eternal-september.org";
posting-account="U2FsdGVkX19q+HG9hk3okyq3JezYz1YE"
User-Agent: Xnews/2009.05.01
X-Face: $W<X:Uw4$"nTXRHqqZ=.|pFI@K,TNNH0i>-J; N5/yst7]cQb.o^L$oAhs-J!C
AOUMQ^NHu3aTb9H8awW~4Y.LR`[o}Rz6Xf=^krb-AwUiM"7zA+QR<vWz'8>hKiTOyd]h
z]7m=[nhuH{NMrE>~][PM`wSKd?TFV-.glh)>N
Cancel-Lock: sha1:pDQU8h8sH7+cgDeIiBx06jja0Xw=
X-Original-Bytes: 4185