🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #195748

Re: [Xnews] RegEx match for empty From: ?

#195748
From: Mike Dee
Date: Mon, 19 Feb 2007 11:09
63 lines
4298 bytes
Pepi <pepi@egg.nog> wrote in
news:Xns98DA608D69641psf37r351740306k76fs@216.196.109.144: 

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

One consideration
If you are testing scoring on empty strings in a particular group, 
your test may not even run, if there are blocking scripts that have 
already run before you opened that particular group. You cleared all 
obstacles before running your script?

Another
There is an Xnews limitation when it comes to handling anything other 
than ASCII (Plain Text - as opposed to Font Type Face). You need to be 
using 3rd party solutions before getting a different or another choice 
at expanding on character sets visually.

ie; Someone making "no name" posts, perhaps isn't playing the ASCII 
role. I don't mind one way or the other how the text comes or even if 
I can read the "From to" header or... Umm I think I did once go over 
the rails on *&^*&&*%*&%* names once, but later gave up on it..
 
> 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.

Fine by me.

-- 
dee
Technical Details
Message-ID: <Xns98DCE15BC90C4emteedee@85.214.50.93>
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!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.albasani.net!news.motzarella.org!not-for-mail
References: <Xns98D9C14BC9831psf37r351740306k76fs@216.196.109.144> <Xns98DA83854D236emteedee@194.177.96.26> <Xns98DA608D69641psf37r351740306k76fs@216.196.109.144>

Show Full Headers
Complete Article Headers
Message-ID: <Xns98DCE15BC90C4emteedee@85.214.50.93>
Subject: Re: [Xnews] RegEx match for empty From: ?
Date: Mon, 19 Feb 2007 11:09:15 +0000
From: Mike Dee <emteedee@invalid.invalid>
References: <Xns98D9C14BC9831psf37r351740306k76fs@216.196.109.144> <Xns98DA83854D236emteedee@194.177.96.26> <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!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.albasani.net!news.motzarella.org!not-for-mail
Newsgroups: news.software.readers
Organization: Poor Boy
Lines: 63
Mime-Version: 1.0
X-Trace: tomate.motzarella.org
 U2FsdGVkX19jDOtbi2vvXvyQ4RD8quO9xnZ0epUqtzi+7xmE49v6EI2trON0dRJTdzRqE0mRFTKoXVKlk/+4WQnGIuzKo9YTGACIglUHktJXihh5wjKOzBvuP0+TMyGg+mMBXxuUkUEQsrC0FqrJTcBsWlno8F6uyaeE6snK4ou2RbDLeKMQIaB3NNh6YaC/7Oe/I0r5XfTlgWM9iwfV3tVdTgK6JWnJfkdXY+Vj7tyTEBjwJW/Vrw==
X-Complaints-To: Please send complaints to abuse@motzarella.org with full
 headers
NNTP-Posting-Date: Mon, 19 Feb 2007 11:09:15 +0000 (UTC)
X-location: Global Village, Earth.
X-it: See ya!
X-Auth-Sender: U2FsdGVkX188To7QmcWbQIh9GoM3DhxE
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
User-Agent: Xnews/2006.08.24
X-salutation: Gudday.