Article View: news.software.readers
Article #195692Re: [Xnews] RegEx match for empty From: ?
From: Pepi
Date: Sat, 17 Feb 2007 08:29
Date: Sat, 17 Feb 2007 08:29
40 lines
3036 bytes
3036 bytes
On 17 feb 2007, Mike Dee<mikedee@emteedee.invalid>, had the following to say to the folks in news.software.readers: >> Headers tell me From: contains "" <> but it seems those characters >> can't be used. Any ideas on how to match an empty From: string and >> nothing else? I.e. no name and no email showing, an this is what I >> want to match. > > If you can't score on non alphanumeric characters, you can employ > the regex escape character "\". For example, escaping the > characters \"\" and \<\> they get treated as the literal characters > "" and <> in scoring. Sorry if I wasn't clear about this, but I did try it with escaping the characters. But this wasn't exactly my problem. It seems the problem was related to, that Xnews--in its infinite wisdom-- apparently has decided, that when scoring is applied where the poster didn't type a name and/or an address, those characters are gone even though they may be visible on the From: header. So, at the time of scoring, there seems to be null, nada, zilch, nothing, to be scored. I.e. an empty string. Anyway, moving on... > However to match or kill anyone using spaces or non characters for > their "From:" header, another approach to employ could be (and > shamelessly adapted from "scoring.txt" examples in Xnews folder): > > [^group\.to\.score\.on$] > Score: -9999 > ~From: .*[a-z] Yes, this seems to work equally well, but I think I prefer the simplicity of the single period, as suggested by Guy. Until that breaks, I'll keep on using it. Your suggestion has been saved in my score file for future reference, however, only commented out for now. Thanks. :-) -- Pepi.
Technical Details
Message-ID:
<Xns98DA608D69641psf37r351740306k76fs@216.196.109.144>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!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mailReferences:
<Xns98D9C14BC9831psf37r351740306k76fs@216.196.109.144> <Xns98DA83854D236emteedee@194.177.96.26>Show Full Headers
Complete Article Headers
Message-ID: <Xns98DA608D69641psf37r351740306k76fs@216.196.109.144> Subject: Re: [Xnews] RegEx match for empty From: ? Date: Sat, 17 Feb 2007 02:29:40 -0600 From: Pepi <pepi@egg.nog> References: <Xns98D9C14BC9831psf37r351740306k76fs@216.196.109.144> <Xns98DA83854D236emteedee@194.177.96.26> 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!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 17 Feb 2007 02:29:40 -0600 Newsgroups: news.software.readers Organization: Whatever User-Agent: Xnews/5.04.25 X-No-Archive: yes X-latin: Ad Omnia Paratus Lines: 40 X-Trace: sv3-zw1Vmik8BaYPATpgge6gCHE0P/DGxV8KoWwCfY7LUhriqptgo9mbnWeI9/t93C0OW0PuJCkbP2LT4He!Lyen2mOaOE3PDkx7tUstjTjMhRfi+TcfrHQGScxjk0nsujCpXJ0YPhJGz2YmbCxR6zmZf4e39WJr!WBAJqYw= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32