🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #151433

Re: [slrn] Scoring Problem

#151433
From: Mike Vanecek
Date: Fri, 09 Jul 2004 14:57
73 lines
3515 bytes
On 8 Jul 2004 20:49:57 GMT, s. keeling wrote:
> On 8 Jul 2004 13:17:16 -0500, Mike Vanecek <MikeV99@privacy.net>:

>>  What would be your recommendations for:

>>  Score:: -8998   %Content...  Sex, Drugs, & Retail
>>  Subject:
>>  \b(F[AST]|cash|earn|e-?bay|money|paypal|warez)\b|for.?(auction|
>>  sale|trade)|furbid|your.chance|income
>>  Subject: ([a-wyz])\1{5}|(?<!m|o)\$|(\w\W\s?){7}|(\w[+_-]){4}

> "F[AST]" in regexps matches fa fs ft.  I'm not sure if slrn supports
> the character class ([...]) construct.

The entire S-lang regex manual:

The S-Lang library supports the following standard regular expressions: 

   .                 match any character except newline
   *                 matches zero or more occurences of previous RE
   +                 matches one or more occurences of previous RE
   ?                 matches zero or one occurence of previous RE
   ^                 matches beginning of a line
   $                 matches end of line
   [ ... ]           matches any single character between brackets.
                     For example, [-02468] matches `-' or any even digit.
                     and [-0-9a-z] matches `-' and any digit between 0 and 9
                     as well as letters a through z.
   \<                Match the beginning of a word.
   \>                Match the end of a word.
   \( ... \)
   \1, \2, ..., \9   Matches the match specified by nth \( ... \) 
                     expression.

In addition the following extensions are also supported: 
   \c                turn on case-sensitivity (default)
   \C                turn off case-sensitivity
   \d                match any digit
   \e                match ESC char



> "|" doesn't work in slrn scores, except as the character "|".

>>  I could not find it in the doco that the word boundary \b is supported. Hence,
>>  my try at this is:

>>  Score:: -8998   %Content...  Sex, Drugs, & Retail
>>    Subject: \<fast\>
>>    Subject: \<cash\>

> That's an OR.  "If it matches _fast_ or it matches _cash_ ..."
> "fastest" and "cashes" wil not be matches.

>>  I am using \<  \> as the slang word boundary from memory -- that may not be
>>  the correct format.

> That's my understanding of them.

OK.

Then F[AST] is the same as f[ast] since slang is case insensitive.

The equivalent to \bF[AST] would be ??

\c\<F[AST]\> which would match FA or FS or FT

I am not sure why one would want to have that match, but I think I have it
figured out ??

-- 
  Thanks, Mike.
Technical Details
Message-ID: <21o2s1-ghl.ln1@news.invalid.99computer>
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!internal1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!newscene!novia!novia!sequencer.newscene.com!not-for-mail
References: <uvigr1-elj.ln1@news.invalid.99computer> <slrncebcfq.tos.nsr@message-id.wahnes-world.de> <Xns951A8BDE2D306ZeroOne@raven.dragonfur.ca> <rgf0s1-fei.ln1@news.invalid.99computer> <slrncercif.mfp.keeling@infidel.spots.ab.ca>

Show Full Headers
Complete Article Headers
Message-ID: <21o2s1-ghl.ln1@news.invalid.99computer>
Subject: Re: [slrn] Scoring Problem
Date: Fri, 09 Jul 2004 14:57:13 +0000
From: Mike Vanecek <MikeV99@privacy.net>
References: <uvigr1-elj.ln1@news.invalid.99computer> <slrncebcfq.tos.nsr@message-id.wahnes-world.de> <Xns951A8BDE2D306ZeroOne@raven.dragonfur.ca> <rgf0s1-fei.ln1@news.invalid.99computer> <slrncercif.mfp.keeling@infidel.spots.ab.ca>
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!internal1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!newscene!novia!novia!sequencer.newscene.com!not-for-mail
Newsgroups: news.software.readers
Lines: 73
X-Archive: encrypt
User-Agent: slrn/0.9.8.0 (Linux)