Article View: news.software.readers
Article #231096Re: [slrn] scoring using wildcards
From: sfb
Date: Sat, 07 Mar 2009 09:53
Date: Sat, 07 Mar 2009 09:53
62 lines
3616 bytes
3616 bytes
On 2009-03-07, Peter J Ross <pjr@example.invalid> wrote:
> 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!
>
Hi Peter. Excellent, thank you. I've saved that for future reference.
I'm trying to move away from the handholding that gui clients provide by
using slrn, mutt and vim all of which a streets ahead of the gui
equivalents. It's a bit of a learning curve, but I'll get there :-)
Thanks again.
sfb
--
Nil Illegitimus Carborundum
Technical Details
Message-ID:
<20090307094821.566@sfb.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!border2.nntp.ams.giganews.com!feeder6.cambrium.nl!feeder4.cambrium.nl!feed.tweaknews.nl!209.197.12.246.MISMATCH!nx02.iad.newshosting.com!newshosting.com!216.196.98.140.MISMATCH!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.posted.plusnet!news.posted.plusnet.POSTED!not-for-mailReferences:
<slrngr03l4.8le.sfb@dajand.me.uk> <slrngr3eev.pg9.pjr@pjr.gotdns.org>Show Full Headers
Complete Article Headers
Message-ID: <20090307094821.566@sfb.invalid> Subject: Re: [slrn] scoring using wildcards Date: Sat, 07 Mar 2009 03:53:11 -0600 From: sfb <sfb@sfb.invalid> References: <slrngr03l4.8le.sfb@dajand.me.uk> <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!border2.nntp.ams.giganews.com!feeder6.cambrium.nl!feeder4.cambrium.nl!feed.tweaknews.nl!209.197.12.246.MISMATCH!nx02.iad.newshosting.com!newshosting.com!216.196.98.140.MISMATCH!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.posted.plusnet!news.posted.plusnet.POSTED!not-for-mail NNTP-Posting-Date: Sat, 07 Mar 2009 03:53:11 -0600 Newsgroups: news.software.readers User-Agent: slrn/pre0.9.9-111 (Linux) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 62 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-l0szjgZLQjt6RWC6d7ktmSwCoNLqivf8aI7b9K8wy8x6idW4uHOX9IMootITc+KDYNUmlE9lCBEucVt!Tv8s/VVy1nYhTccBGa7zRzsmQzF0Iw8+Fy5pdz9VFvdQovCEDs3vQbzILkp8khGM 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.39 X-Original-Bytes: 3166