Article View: news.software.readers
Article #231084Re: [slrn] scoring using wildcards
From: Peter J Ross
Date: Sat, 07 Mar 2009 00:03
Date: Sat, 07 Mar 2009 00:03
57 lines
3204 bytes
3204 bytes
In news.software.readers on Thu, 05 Mar 2009 11:40:52 -0600, sfb
<sfb@sfb.invalid> wrote:
> Hi everybody. I'm trying to kill a poster who uses numbers in the 'from'
> part of the header. The numbers change and I was wondering if there was
> some way of using wildcards in the score file 'from' attribute?
No. You can use regular expressions but not wildcards. The good news
is that regular expressions are much more powerful than wildcards.
> I've
> looked at the documentation and it seems wildcards are only useable in
> the [newsgroup] indicator.
Correct.
> I've tried the usuals, * and ?, but they don't
> seem to work. Is there a way of using wildcards in the way I would like.
> Thanks
The equivalent of "*" in regular expressions is ".*". The equivalent
of "?" is ".?".
But if you want to match something like
foo123bar@example.com
foo567bar@example.com
and
foo890bar@example.com
try something like
From: foo[0-9]\{3\}bar@example\.com
in your slrn scorefile. Here "[0-9]" means a digit from 0 to 9
inclusive, and "\{3\}" means "exactly three occurences of the '[0-9]'
pattern". If the number of digits varies, you could use something like
From: foo[0-9]\{2,5\}bar@example\.com
where any number of successive digits from 2 to 5 will be matched.
The file score.txt which is included with slrn provides some useful
information and examples, but don't hesitate to ask for more
explanations here. Regular expressions are complicated until you get
used to them, and slrn's regular expressions are particularly
complicated because they're not quite the same as other kinds of
regular expressions.
Have fun with slrn!
--
PJR :-)
slrn newsreader v0.9.9p1: http://slrn.sourceforge.net/
extra slrn documentation: http://slrn-doc.sourceforge.net/
newsgroup name validator: http://pjr.lasnobberia.net/usenet/validator
Technical Details
Message-ID:
<slrngr3eev.pg9.pjr@pjr.gotdns.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.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!feeder.erje.net!news.motzarella.org!motzarella.org!pjr.motzarella.org!not-for-mailReferences:
<slrngr03l4.8le.sfb@dajand.me.uk>Show Full Headers
Complete Article Headers
Message-ID: <slrngr3eev.pg9.pjr@pjr.gotdns.org> Subject: Re: [slrn] scoring using wildcards Date: Sat, 07 Mar 2009 00:03:43 +0000 From: Peter J Ross <pjr@example.invalid> References: <slrngr03l4.8le.sfb@dajand.me.uk> 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.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!feeder.erje.net!news.motzarella.org!motzarella.org!pjr.motzarella.org!not-for-mail Newsgroups: news.software.readers Organization: none Lines: 57 Reply-To: Peter J Ross <peadar.ruadh@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.eternal-september.org U2FsdGVkX1/cmxcxQOfIFGOUT6RxkHhN36zOX2qFgT0k1Z7LRe0P3nlevON7FaInBk53w2BkmDXxuQgFMIyfrIY38oGVzOpp8GSweMGS73LZxEwn3miyan/SZ9NLa/lCfS8gKZdzO6I= X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers NNTP-Posting-Date: Sat, 7 Mar 2009 00:18:02 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1/T8M+QUTZSMtMGlz0n1y8z Cancel-Lock: sha1:L9rGsVzl46n9ELQPNQW00IIxp3c= User-Agent: slrn/pre1.0.0-2/mm (Linux) X-Original-Bytes: 2918