🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #60983

Re: [slrn] Scoring a 4 digit number on the end of a subject line.

#60983
From: Sylvan Butler
Date: Wed, 26 Apr 2000 00:00
63 lines
3074 bytes
On Wed, 26 Apr 2000 10:40:53 GMT, ras2 <removethis@gmx.net> wrote:
>On 25 Apr 2000 19:38:38 GMT, Sylvan Butler
><nospam+_no_Zs__0004@hpb13799z.zboi.hpz.com.invalid> wrote in 
><slrn8gbtcp.rnj.nospam+_no_Zs__0004@hpb13799z.zboi.hpz.com.invalid>:
>> 
>> I use:
>> % lines ending with a number are typically spam
>>   Score:: -9900
>>   Expires: 6/1/2000
>>     Subject: . [0-9]\{5,\}$
>>     Subject: .  [0-9]\{3,\}$
>
>(should the "{}" really be escaped here?)

I think so.  But I could very easily be wrong!

>> for years (there is likely a better way of coding "and not" but this is
>> what I did). 
>
>Judging from a test I just made, you can use something like this:
>
>Score: -9900
>   Subject: . [0-9]\{5,\}$
>   ~Subject: .  1998$
>   ~Subject: .  1999$
>   ~Subject: .  2000$
>   ~Subject: .  2001$

Ahh, yes.  (But you don't need those cases there because years are only
4 digits, and 5+ digits won't match them.  :)

>Score: -9900
>   Subject: .  [0-9]\{3,\}$
>   ~Subject: .  1998$
>   ~Subject: .  1999$
>   ~Subject: .  2000$
>   ~Subject: .  2001$
>
>In this case, this method gives far more lines in the scorefile for
>the same result, but it might be useful in some other context.

But since you don't need the check in the 5-digit case the lines end up
about the same.

>There must be a better way, but "\s" doesn't seem to work and I can't
>locate the description of S-Lang types I had.

Yeah, it seems like I found a better way once, but didn't go back and
update the old working rules.  Perhaps a "\b" ?

My document from 1997 doesn't list such.  I copied it from:
http://www.math.ohio-state.edu/~lahvak/software/slang/regexps.html

sdb

-- 
 | Sylvan Butler | Not speaking for Hewlett-Packard | sbutler-boi.hp.com |
 | Watch out for my e-mail address. Thank UCE.   #### change ^ to @ #### |
    They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety. --Benjamin Franklin, 1759
 "Don't Tread On Me!"

Technical Details
Message-ID: <slrn8germh.43m.nospam+_no_Zs__0004@hpb13799z.zboi.hpz.com.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.mbox.zip!not-for-mail
References: <slrn8gbbjp.mes.cl00bie@io.jtan.com> <slrn8gbtcp.rnj.nospam+_no_Zs__0004@hpb13799z.zboi.hpz.com.invalid> <slrn8gd7lu.5jf.removethis@gmx.net>

Show Full Headers
Complete Article Headers
Message-ID: <slrn8germh.43m.nospam+_no_Zs__0004@hpb13799z.zboi.hpz.com.invalid>
Subject: Re: [slrn] Scoring a 4 digit number on the end of a subject line.
Date: Wed, 26 Apr 2000 00:00:00 +0000
From: nospam+_no_Zs__0004@hpb13799z.zboi.hpz.com.invalid (Sylvan Butler)
References: <slrn8gbbjp.mes.cl00bie@io.jtan.com> <slrn8gbtcp.rnj.nospam+_no_Zs__0004@hpb13799z.zboi.hpz.com.invalid> <slrn8gd7lu.5jf.removethis@gmx.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.mbox.zip!not-for-mail
X-Deja-AN: 616101933
X-Original-NNTP-Posting-Host: hpb13799.boi.hp.com
Mail-Copies-To: never
X-Complaints-To: usenet@news.boi.hp.com
X-Trace: hpbs1500.boi.hp.com 956789428 2090 15.98.137.41 (26 Apr 2000 22:50:28 GMT)
Organization: Hewlett-Packard
User-Agent: slrn/0.9.5.7 (Linux)
NNTP-Posting-Date: 26 Apr 2000 22:50:28 GMT
Newsgroups: news.software.readers