Thread View: news.software.readers
55 messages
55 total messages
Page 1 of 2
Started by Mike Vanecek
Fri, 02 Jul 2004 17:43
Page 1 of 2 • 55 total messages
[slrn] Scoring Problem
Author: Mike Vanecek
Date: Fri, 02 Jul 2004 17:43
Date: Fri, 02 Jul 2004 17:43
24 lines
1738 bytes
1738 bytes
I have a score entry (without line wraps) of
Score:: =-8997 %Spamage... Porn & Viral Spamage
Subject:
Britney.Spears|Christina.?Aguilera|Gina.Lynn|Hillary.Duff|Jennifer.Lopez|Jessica.Simpson
Subject:
(cap|pic|set|vid)#|free\b.*(?!pick)(pi[cx]|porn|vid)|\s\d{3,}(?<!200[0-5]|50[1-4]|445)$
Subject: .*(penis|cam|gay|nude)
However, a subject such as
Gays Captured on video 6863
does not trigger the entry -- it goes on down the list to the cross post text.
I have tried several different regex expression, but am unable to hit on the
correct one except for the simple Subject: .*cam (for example).
What am I doing wrong?
--
Thanks, Mike.
Re: [slrn] Scoring Problem
Author: Jens Wahnes
Date: Fri, 02 Jul 2004 19:05
Date: Fri, 02 Jul 2004 19:05
17 lines
1679 bytes
1679 bytes
Mike Vanecek wrote:
> What am I doing wrong?
slrn does not (currently) use Perl-style regular expressions but s-lang
regular expressions, so the xpressions you used are not valid.
Specifically, s-lang regular expressions miss the "or" operator that
you made heavy use of. This very problem can usually be worked around
by using the "grouping" feature of the scorefile syntax, i.e. putting
(sub-)expressions into "{: }" or "{:: }" See
http://www.s-lang.org/doc/html/slang-18.html for an overview of s-lang
regular expressions and the last three paragraphs of score.txt for more
information on grouping scorefile rules.
Jens
Re: [slrn] Scoring Problem
Author: s. keeling
Date: Fri, 02 Jul 2004 19:15
Date: Fri, 02 Jul 2004 19:15
49 lines
3372 bytes
3372 bytes
On 2 Jul 2004 12:43:10 -0500, Mike Vanecek <MikeV99@privacy.net>:
> I have a score entry (without line wraps) of
>
> Score:: =-8997 %Spamage... Porn & Viral Spamage
> Subject:
> Britney.Spears|Christina.?Aguilera|Gina.Lynn|Hillary.Duff|Jennifer.Lopez|Jessica.Simpson
> Subject:
> (cap|pic|set|vid)#|free\b.*(?!pick)(pi[cx]|porn|vid)|\s\d{3,}(?<!200[0-5]|50[1-4]|445)$
> Subject: .*(penis|cam|gay|nude)
>
> However, a subject such as
>
> Gays Captured on video 6863
>
> does not trigger the entry -- it goes on down the list to the cross post text.
>
> I have tried several different regex expression, but am unable to hit on the
> correct one except for the simple Subject: .*cam (for example).
I've tried things like that too, and what I've managed to come up with
is "slrn is not procmail." I've not managed to come up with an
understandable and definitive exposition of what regexps are valid in
slrn Scores. Consequently, my Score file is a few thousand lines
long, much of which is multiples of "Subject: blah1", "Subject:
blah2", & etc.
For your example above[*]:
Subject: gay
should work against "gay" or "gays". If it matches anywhere on the
line, it's a hit, so you don't need the procmail-ish ".*" in there.
You can limit that match with \<gay\> to match "gay" but not "gays".
You can also use only \< or \> to only match the beginning or end of
the word.
I would love to hear how others do this. "Subject: (this|that|the other)"
would be very useful.
[*] Apologies to the real gays out there. Nothing personal. It
(presumably?) just has nothing to do with us.
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://www.spots.ab.ca/~keeling
- - Spammers! http://www.spots.ab.ca/~keeling/spammers.html
http://learn.to/quote http://www.netmeister.org/news/learn2quote.html
Re: [slrn] Scoring Problem
Author: Tech Zero
Date: Fri, 02 Jul 2004 19:44
Date: Fri, 02 Jul 2004 19:44
49 lines
2719 bytes
2719 bytes
The voice of "Jens Wahnes" drifted in on the cyber-winds,
from the sea of virtual chaos...
> Mike Vanecek wrote:
>
>> What am I doing wrong?
>
> slrn does not (currently) use Perl-style regular expressions but
> s-lang regular expressions, so the xpressions you used are not
> valid. Specifically, s-lang regular expressions miss the "or"
> operator that you made heavy use of.
>
> This very problem can usually be worked around by using the
> "grouping" feature of the scorefile syntax, i.e. putting
> (sub-)expressions into "{: }" or "{:: }"
As creator of that "Xnews Monstrosity", allow me... };8)
Score:: -4200 %Spamage... Viral Spamage
From: @toons-x\.com
From: @toontoon\.com
Subject: Britney.Spears
Subject: Christina.?Aguilera
Subject: Gina.Lynn
Subject: Hillary.Duff
Subject: Jennifer.Lopez
Subject: Jessica.Simpson
Subject: cap#
Subject: pic#
Subject: set#
Subject: vid#
Subject: free\b.*(?!pick)pi[cx]
Subject: free\b.*porn
Subject: free\b.*vid
Subject: \s\d{3,}(?<!200[0-5])$
"50[1-4]" & "445" in "\s\d{3,}(?<!200[0-5]|50[1-4]|445)" are exceptions
for a tech group I'm subscribed to, so they're not necessary.
> See http://www.s-lang.org/doc/html/slang-18.html for an overview
> of s-lang regular expressions and the last three paragraphs of
> score.txt for more information on grouping scorefile rules.
I'll have to make a note of this for my conversion tables...
--
The Tech Zero, Maxx "What's That Score" Pollare...
Discordian Time: 149:02:01 (1) [no thud]
Re: [slrn] Scoring Problem
Author: Tech Zero
Date: Fri, 02 Jul 2004 19:53
Date: Fri, 02 Jul 2004 19:53
21 lines
1781 bytes
1781 bytes
The voice of "s. keeling" drifted in on the cyber-winds, from the sea of virtual chaos... > For your example above[*]: > > Subject: gay > > should work against "gay" or "gays". If it matches anywhere on > the line, it's a hit, so you don't need the procmail-ish ".*" in > there. You can limit that match with \<gay\> to match "gay" but > not "gays". You can also use only \< or \> to only match the > beginning or end of the word. Ahhh... So "\b" (word boundery) is equivelent to "\<" and "\>" in slrn? -- The Tech Zero, Maxx "What's That Score" Pollare... Discordian Time: 150:02:01 (1) [no thud]
Re: [slrn] Scoring Problem
Author: DC
Date: Fri, 02 Jul 2004 20:31
Date: Fri, 02 Jul 2004 20:31
32 lines
2391 bytes
2391 bytes
Mike Vanecek wrote:
> I have a score entry (without line wraps) of
> Score:: =-8997 %Spamage... Porn & Viral Spamage
> Subject:
> Britney.Spears|Christina.?Aguilera|Gina.Lynn|Hillary.Duff|Jennifer.Lopez|Jessica.Simpson
> Subject:
> (cap|pic|set|vid)#|free\b.*(?!pick)(pi[cx]|porn|vid)|\s\d{3,}(?<!200[0-5]|50[1-4]|445)$
> Subject: .*(penis|cam|gay|nude)
> However, a subject such as
> Gays Captured on video 6863
> does not trigger the entry -- it goes on down the list to the cross post text.
> I have tried several different regex expression, but am unable to hit on the
> correct one except for the simple Subject: .*cam (for example).
> What am I doing wrong?
Try this:
Subject: \ \ [0-9]+$
This will kill those spams that you frequently see which use two spaces
and trailing digits in the subject lines to try to thwart some filters.
--
DC Linux RU #1000111011000111001
Free your mind, and your OS will follow...
Re: [slrn] Scoring Problem
Author: s. keeling
Date: Sat, 03 Jul 2004 17:39
Date: Sat, 03 Jul 2004 17:39
27 lines
2304 bytes
2304 bytes
On 2 Jul 2004 19:53:41 GMT, Tech Zero <spamnet-jul@dragonfur.ca>: > The voice of "s. keeling" drifted in on the cyber-winds, > from the sea of virtual chaos... Uhh, what? I don't see no stinking chaos. > > For your example above[*]: > > > > Subject: gay > > > > should work against "gay" or "gays". If it matches anywhere on > > the line, it's a hit, so you don't need the procmail-ish ".*" in > > there. You can limit that match with \<gay\> to match "gay" but > > not "gays". You can also use only \< or \> to only match the > > beginning or end of the word. > > So "\b" (word boundery) is equivelent to "\<" and "\>" in slrn? Correct. Also, there's \c and \C for case sensitivity (slrn defaults to case insensitive). When in doubt, check against the s-lang regexps. -- Any technology distinguishable from magic is insufficiently advanced. (*) http://www.spots.ab.ca/~keeling - - Spammers! http://www.spots.ab.ca/~keeling/spammers.html http://learn.to/quote http://www.netmeister.org/news/learn2quote.html
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Thu, 08 Jul 2004 18:12
Date: Thu, 08 Jul 2004 18:12
41 lines
1958 bytes
1958 bytes
On Fri, 2 Jul 2004 19:05:30 +0000 (UTC), Jens Wahnes wrote:
> Mike Vanecek wrote:
>> What am I doing wrong?
> slrn does not (currently) use Perl-style regular expressions but s-lang
> regular expressions, so the xpressions you used are not valid.
> Specifically, s-lang regular expressions miss the "or" operator that
> you made heavy use of. This very problem can usually be worked around
> by using the "grouping" feature of the scorefile syntax, i.e. putting
> (sub-)expressions into "{: }" or "{:: }" See
> http://www.s-lang.org/doc/html/slang-18.html for an overview of s-lang
> regular expressions and the last three paragraphs of score.txt for more
> information on grouping scorefile rules.
> Jens
I read both references and am not sure it helps with the OR situation. E.g.,
Subject: this|that|more
still has to be written
Subject: this
Subject: that
Subject: more
If I understand it correctly??, the following would not work:
Subject: {::
this
that
more
}
Hence, grouping really does not help with this?
--
Thanks, Mike.
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Thu, 08 Jul 2004 18:17
Date: Thu, 08 Jul 2004 18:17
28 lines
1755 bytes
1755 bytes
On 2 Jul 2004 19:44:58 GMT, Tech Zero wrote:
> As creator of that "Xnews Monstrosity", allow me... };8)
Thank you for your help with the conversion.
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}
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\>
but am not sure about the others.
I am using \< \> as the slang word boundary from memory -- that may not be
the correct format. I will check a further message to make sure.
--
Thanks, Mike.
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Thu, 08 Jul 2004 18:28
Date: Thu, 08 Jul 2004 18:28
37 lines
1970 bytes
1970 bytes
On 2 Jul 2004 19:53:41 GMT, Tech Zero wrote: > The voice of "s. keeling" drifted in on the cyber-winds, > from the sea of virtual chaos... >> For your example above[*]: >> Subject: gay >> should work against "gay" or "gays". If it matches anywhere on >> the line, it's a hit, so you don't need the procmail-ish ".*" in >> there. You can limit that match with \<gay\> to match "gay" but >> not "gays". You can also use only \< or \> to only match the >> beginning or end of the word. > Ahhh... > So "\b" (word boundery) is equivelent to "\<" and "\>" in slrn? Is it? Would not \bcash match spacecashspace (i.e., cash delimited by leading and trailing spaces unless at the end or beginning of a line)? However, would not \<cash\> match the word cash no matter where it is (e.g., cashless would have a match? What is the difference between Subject: cash and Subject: \<cash\> ? other than to prevent a match on cashes? So, what is the slang equivalent of \b ? -- Thanks, Mike.
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Thu, 08 Jul 2004 18:28
Date: Thu, 08 Jul 2004 18:28
12 lines
1309 bytes
1309 bytes
On 3 Jul 2004 17:39:32 GMT, s. keeling wrote: > Correct. Also, there's \c and \C for case sensitivity (slrn defaults > to case insensitive). When in doubt, check against the s-lang regexps. The s-lang regexps doco are not very robust. Do any other sources exist that may be more detailed? -- Thanks, Mike.
Re: [slrn] Scoring Problem
Author: Blinky the Shark
Date: Thu, 08 Jul 2004 18:45
Date: Thu, 08 Jul 2004 18:45
47 lines
2375 bytes
2375 bytes
Mike Vanecek wrote:
> On Fri, 2 Jul 2004 19:05:30 +0000 (UTC), Jens Wahnes wrote:
>> Mike Vanecek wrote:
>>> What am I doing wrong?
>> slrn does not (currently) use Perl-style regular expressions but s-lang
>> regular expressions, so the xpressions you used are not valid.
>> Specifically, s-lang regular expressions miss the "or" operator that
>> you made heavy use of. This very problem can usually be worked around
>> by using the "grouping" feature of the scorefile syntax, i.e. putting
>> (sub-)expressions into "{: }" or "{:: }" See
>> http://www.s-lang.org/doc/html/slang-18.html for an overview of s-lang
>> regular expressions and the last three paragraphs of score.txt for more
>> information on grouping scorefile rules.
>> Jens
> I read both references and am not sure it helps with the OR situation. E.g.,
> Subject: this|that|more
Those are ORs, right?
> still has to be written
> Subject: this
> Subject: that
> Subject: more
Aren't those ANDs?
> If I understand it correctly??, the following would not work:
> Subject: {::
> this
> that
> more
> }
That would be thre ORs, I believe, and would be the same as
this|that|more
--
Blinky Linux Registered User 297263
New June 23:
Linux In 20 Steps: (at Blinkynet) http://snipurl.com/7amq
Re: [slrn] Scoring Problem
Author: paf the dog
Date: Thu, 08 Jul 2004 18:47
Date: Thu, 08 Jul 2004 18:47
13 lines
1526 bytes
1526 bytes
Mike Vanecek grumbled: > > The s-lang regexps doco are not very robust. Do any other sources > exist that may be more detailed? rgrep is said to use the same syntax as slang regexp this is useful for testing but also, the rgrep man is more detailled than the slang re doc -- paf the dog remove primate to reply
Re: [slrn] Scoring Problem
Author: SINNER
Date: Thu, 08 Jul 2004 19:22
Date: Thu, 08 Jul 2004 19:22
20 lines
1621 bytes
1621 bytes
* Blinky the Shark Wrote in news.software.readers:
>> Subject: {::
>> this
>> that
>> more
>> }
>
> That would be thre ORs, I believe, and would be the same as
> this|that|more
I thought it had to be:
Score::
Subject:
Subject:
Etc, It seems like the brackets would be redundant.
--
David
Re: [slrn] Scoring Problem
Author: Tech Zero
Date: Thu, 08 Jul 2004 20:34
Date: Thu, 08 Jul 2004 20:34
39 lines
2381 bytes
2381 bytes
The voice of "Mike Vanecek" drifted in on the cyber-winds,
from the sea of virtual chaos...
> Thank you for your help with the conversion.
> 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}
The first part is eazy...
Score:: -8998 %Content... Sex, Drugs, & Retail
Subject: \<F[AST]\>
Subject: cash\>
Subject: \<earn
Subject: \<e-?bay
Subject: for.?auction
Subject: for.?sale
Subject: for.?trade
Subject: furbid
Subject: income
Subject: money
Subject: paypal
Subject: your.chance
Subject: warez
I "think" the second part should convert to below:
Score:: -8998 %Content... Sex, Drugs, & Retail
Subject: ([a-wyz])\1{5}
Subject: (?<![mo])\$
Subject: ([a-z0-9][^a-z0-9] ?){7}
Subject: ([a-z0-9][+_-]){4}
But I'm less confident that this will work as it should...
--
The Tech Zero, Maxx "What's That Score" Pollare...
Re: [slrn] Scoring Problem
Author: DC
Date: Thu, 08 Jul 2004 20:45
Date: Thu, 08 Jul 2004 20:45
21 lines
1619 bytes
1619 bytes
Blinky the Shark wrote: > Mike Vanecek wrote: [...] >> Subject: this >> Subject: that >> Subject: more > Aren't those ANDs? Isn't that determined by the : or :: following the Score entry? i.e. Score: AND Score:: OR -- DC Linux RU #1000111011000111001 Free your mind, and your OS will follow...
Re: [slrn] Scoring Problem
Author: s. keeling
Date: Thu, 08 Jul 2004 20:49
Date: Thu, 08 Jul 2004 20:49
36 lines
2616 bytes
2616 bytes
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.
"|" 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.
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://www.spots.ab.ca/~keeling
- - Spammers! http://www.spots.ab.ca/~keeling/spammers.html
http://learn.to/quote http://www.netmeister.org/news/learn2quote.html
Re: [slrn] Scoring Problem
Author: s. keeling
Date: Thu, 08 Jul 2004 20:59
Date: Thu, 08 Jul 2004 20:59
30 lines
2148 bytes
2148 bytes
On Thu, 08 Jul 2004 19:22:13 GMT, SINNER <me@privacy.net>:
> * Blinky the Shark Wrote in news.software.readers:
>
> >> Subject: {::
> >> this
> >> that
> >> more
> >> }
> >
> > That would be thre ORs, I believe, and would be the same as
> > this|that|more
>
> I thought it had to be:
>
> Score::
> Subject:
> Subject:
>
> Etc, It seems like the brackets would be redundant.
In this example, the brackets would replace two "Subject:"s. That's
not redundancy. I would much prefer the former syntax, if I could
verify it worked.
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://www.spots.ab.ca/~keeling
- - Spammers! http://www.spots.ab.ca/~keeling/spammers.html
http://learn.to/quote http://www.netmeister.org/news/learn2quote.html
Re: [slrn] Scoring Problem
Author: Blinky the Shark
Date: Thu, 08 Jul 2004 22:00
Date: Thu, 08 Jul 2004 22:00
27 lines
1716 bytes
1716 bytes
SINNER wrote:
> * Blinky the Shark Wrote in news.software.readers:
>>> Subject: {::
>>> this
>>> that
>>> more
>>> }
>> That would be thre ORs, I believe, and would be the same as
>> this|that|more
> I thought it had to be:
> Score::
> Subject:
> Subject:
> Etc, It seems like the brackets would be redundant.
In this simple case, they would be. But they do have their uses.
--
Blinky Linux Registered User 297263
New June 23:
Linux In 20 Steps: (at Blinkynet) http://snipurl.com/7amq
Re: [slrn] Scoring Problem
Author: Blinky the Shark
Date: Thu, 08 Jul 2004 22:02
Date: Thu, 08 Jul 2004 22:02
38 lines
1785 bytes
1785 bytes
DC wrote: > Blinky the Shark wrote: >> Mike Vanecek wrote: > [...] >>> Subject: this >>> Subject: that >>> Subject: more >> Aren't those ANDs? > Isn't that determined by the : or :: following the Score entry? >From the post to which I was responding: <q> Subject: this|that|more still has to be written Subject: this Subject: that Subject: more </q> I don't see any nesting, there. If it's somehow implied, I withdraw my question. -- Blinky Linux Registered User 297263 New June 23: Linux In 20 Steps: (at Blinkynet) http://snipurl.com/7amq
Re: [slrn] Scoring Problem
Author: Blinky the Shark
Date: Thu, 08 Jul 2004 22:03
Date: Thu, 08 Jul 2004 22:03
24 lines
1580 bytes
1580 bytes
DC wrote: > Blinky the Shark wrote: >> Mike Vanecek wrote: > [...] >>> Subject: this >>> Subject: that >>> Subject: more >> Aren't those ANDs? > Isn't that determined by the : or :: following the Score entry? SECOND REPLY: My bad; of course it is. Entirely st00pid reading on my part. -- Blinky Linux Registered User 297263 New June 23: Linux In 20 Steps: (at Blinkynet) http://snipurl.com/7amq
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Fri, 09 Jul 2004 14:37
Date: Fri, 09 Jul 2004 14:37
28 lines
1417 bytes
1417 bytes
On 8 Jul 2004 20:45:45 GMT, DC wrote:
> Blinky the Shark wrote:
>> Mike Vanecek wrote:
> [...]
>>> Subject: this
>>> Subject: that
>>> Subject: more
>> Aren't those ANDs?
> Isn't that determined by the : or :: following the Score entry?
> i.e.
> Score: AND
> Score:: OR
Yes, and within the brackets as well
{: AND
{:: OR
--
Thanks, Mike.
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Fri, 09 Jul 2004 14:43
Date: Fri, 09 Jul 2004 14:43
54 lines
1895 bytes
1895 bytes
On 8 Jul 2004 22:02:46 GMT, Blinky the Shark wrote:
> DC wrote:
>> Blinky the Shark wrote:
>>> Mike Vanecek wrote:
>> [...]
>>>> Subject: this
>>>> Subject: that
>>>> Subject: more
>>> Aren't those ANDs?
>> Isn't that determined by the : or :: following the Score entry?
> From the post to which I was responding:
><q>
> Subject: this|that|more
> still has to be written
Score:: -- as you point out is OR
> Subject: this
> Subject: that
> Subject: more
></q>
> I don't see any nesting, there.
> If it's somehow implied, I withdraw my question.
Score:
{::
Subject: this
Subject: that
}
From: someone
is OR'd within the brackets, but overall is AND'd
Subject: this AND From: someone
OR
Subject: that AND From: someone
--
Thanks, Mike.
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Fri, 09 Jul 2004 14:47
Date: Fri, 09 Jul 2004 14:47
46 lines
2322 bytes
2322 bytes
On 8 Jul 2004 20:34:12 GMT, Tech Zero wrote:
> The voice of "Mike Vanecek" drifted in on the cyber-winds,
> from the sea of virtual chaos...
>> Thank you for your help with the conversion.
>> 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}
> The first part is eazy...
> Score:: -8998 %Content... Sex, Drugs, & Retail
> Subject: \<F[AST]\>
> Subject: cash\>
> Subject: \<earn
> Subject: \<e-?bay
> Subject: for.?auction
> Subject: for.?sale
> Subject: for.?trade
> Subject: furbid
> Subject: income
> Subject: money
> Subject: paypal
> Subject: your.chance
> Subject: warez
> I "think" the second part should convert to below:
> Score:: -8998 %Content... Sex, Drugs, & Retail
> Subject: ([a-wyz])\1{5}
> Subject: (?<![mo])\$
> Subject: ([a-z0-9][^a-z0-9] ?){7}
> Subject: ([a-z0-9][+_-]){4}
> But I'm less confident that this will work as it should...
Thanks. It was the second part I was having a little problem figuring out as
well. What is the filtering purpose of each of the four?
--
Thanks, Mike.
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Fri, 09 Jul 2004 14:57
Date: Fri, 09 Jul 2004 14:57
73 lines
3515 bytes
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.
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Fri, 09 Jul 2004 15:02
Date: Fri, 09 Jul 2004 15:02
48 lines
2296 bytes
2296 bytes
On 8 Jul 2004 13:28:38 -0500, Mike Vanecek wrote: > On 2 Jul 2004 19:53:41 GMT, Tech Zero wrote: >> The voice of "s. keeling" drifted in on the cyber-winds, >> from the sea of virtual chaos... >>> For your example above[*]: >>> Subject: gay >>> should work against "gay" or "gays". If it matches anywhere on >>> the line, it's a hit, so you don't need the procmail-ish ".*" in >>> there. You can limit that match with \<gay\> to match "gay" but >>> not "gays". You can also use only \< or \> to only match the >>> beginning or end of the word. >> Ahhh... >> So "\b" (word boundery) is equivelent to "\<" and "\>" in slrn? > Is it? Would not \bcash match spacecashspace (i.e., cash delimited by leading > and trailing spaces unless at the end or beginning of a line)? > However, would not \<cash\> match the word cash no matter where it is (e.g., > cashless would have a match? What is the difference between > Subject: cash > and > Subject: \<cash\> > ? > other than to prevent a match on cashes? > So, what is the slang equivalent of \b ? I think I have this one figured out \< - beginning of word \> - end of word So \< ... \> is the same as \b So, please forget the above question. The original poster had it correct and I was confused, but hopefully less so now ... -- Thanks, Mike.
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Fri, 09 Jul 2004 15:03
Date: Fri, 09 Jul 2004 15:03
16 lines
1444 bytes
1444 bytes
On 08 Jul 2004 18:47:46 GMT, paf the dog wrote: > Mike Vanecek grumbled: >> The s-lang regexps doco are not very robust. Do any other sources >> exist that may be more detailed? > rgrep is said to use the same syntax as slang regexp > this is useful for testing but also, the rgrep man is more detailled > than the slang re doc I have grep, egrep, zgrep -- but no rgrep. Off to google ... -- Thanks, Mike.
Re: [slrn] Scoring Problem
Author: Tech Zero
Date: Fri, 09 Jul 2004 18:37
Date: Fri, 09 Jul 2004 18:37
15 lines
1816 bytes
1816 bytes
The voice of "Mike Vanecek" drifted in on the cyber-winds,
from the sea of virtual chaos...
> Thanks. It was the second part I was having a little problem
> figuring out as well. What is the filtering purpose of each
> of the four?
"([a-wyz])\1{5}" - 5 or more repeated characters, except "x"
"(?<![mo])\$" - subjects a "$", except Micro$oft or M$
"(\w\W\s?){7}" - u*n*n*a*t*u*r*a*l s p a c e s
"(\w[+_-]){4}" - m+o+r+e u_n_n_a_t_u_r_a_l s-p-a-c-e-s
--
The Tech Zero, Maxx "What's That Score" Pollare...
Re: [slrn] Scoring Problem
Author: Tech Zero
Date: Fri, 09 Jul 2004 18:43
Date: Fri, 09 Jul 2004 18:43
24 lines
1794 bytes
1794 bytes
The voice of "Mike Vanecek" drifted in on the cyber-winds, from the sea of virtual chaos... >> So, what is the slang equivalent of \b ? > > I think I have this one figured out > \< - beginning of word > \> - end of word > > So \< ... \> is the same as \b > > So, please forget the above question. The original poster had > it correct and I was confused, but hopefully less so now ... I should have worded it difrently... \bflower -> \<flower flower\b -> flower\> Does that make sence? -- The Tech Zero, Maxx "What's That Score" Pollare...
Re: [slrn] Scoring Problem
Author: Tech Zero
Date: Fri, 09 Jul 2004 18:53
Date: Fri, 09 Jul 2004 18:53
28 lines
2218 bytes
2218 bytes
> The voice of "Mike Vanecek" drifted in on the cyber-winds,
> from the sea of virtual chaos...
>
>> Thanks. It was the second part I was having a little problem
>> figuring out as well. What is the filtering purpose of each
>> of the four?
>
>
> "([a-wyz])\1{5}" - 5 or more repeated characters, except "x"
> "(?<![mo])\$" - subjects a "$", except Micro$oft or M$
> "(\w\W\s?){7}" - u*n*n*a*t*u*r*a*l s p a c e s
> "(\w[+_-]){4}" - m+o+r+e u_n_n_a_t_u_r_a_l s-p-a-c-e-s
I should add, in Xnews:
"\s" - any whitespace character
"\S" - any character that is not a whitespace character
"\w" - any "word" character
"\W" - any "non-word" character
In order translate these you'd have to use square brackets:
"[...]" - a set character range
For example; "F[AST]" is equivalent to "FA", "FS", & "FT".
--
The Tech Zero, Maxx "What's That Score" Pollare...
Re: [slrn] Scoring Problem
Author: Blinky the Shark
Date: Fri, 09 Jul 2004 23:00
Date: Fri, 09 Jul 2004 23:00
56 lines
2340 bytes
2340 bytes
Mike Vanecek wrote:
> On 8 Jul 2004 22:02:46 GMT, Blinky the Shark wrote:
>> DC wrote:
>>> Blinky the Shark wrote:
>>>> Mike Vanecek wrote:
>>> [...]
>>>>> Subject: this
>>>>> Subject: that
>>>>> Subject: more
>>>> Aren't those ANDs?
>>> Isn't that determined by the : or :: following the Score entry?
>> From the post to which I was responding:
>><q>
>> Subject: this|that|more
>> still has to be written
> Score:: -- as you point out is OR
>> Subject: this
>> Subject: that
>> Subject: more
>></q>
>> I don't see any nesting, there.
>> If it's somehow implied, I withdraw my question.
> Score:
> {::
> Subject: this
> Subject: that
> }
> From: someone
> is OR'd within the brackets, but overall is AND'd
> Subject: this AND From: someone
> OR
> Subject: that AND From: someone
As I posted in a casual retraction, I was reading st00pidly. :)
--
Blinky Linux Registered User 297263
New June 23:
Linux In 20 Steps: (at Blinkynet) http://snipurl.com/7amq
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Sat, 10 Jul 2004 00:42
Date: Sat, 10 Jul 2004 00:42
47 lines
2619 bytes
2619 bytes
On 9 Jul 2004 18:53:32 GMT, Tech Zero wrote:
>> The voice of "Mike Vanecek" drifted in on the cyber-winds,
>> from the sea of virtual chaos...
>>> Thanks. It was the second part I was having a little problem
>>> figuring out as well. What is the filtering purpose of each
>>> of the four?
>> "([a-wyz])\1{5}" - 5 or more repeated characters, except "x"
>> "(?<![mo])\$" - subjects a "$", except Micro$oft or M$
>> "(\w\W\s?){7}" - u*n*n*a*t*u*r*a*l s p a c e s
>> "(\w[+_-]){4}" - m+o+r+e u_n_n_a_t_u_r_a_l s-p-a-c-e-s
I have not been able to get {n} or \{n\} to work in slang. Either I am doing
it incorrectly or it is not supported as well.
Hence, I am not sure how one would do 5 or more repeated characters except x.
Also, grouping seems to require \(....\)? Actually, I am not sure how I would
do any of the repeating patterns.
> I should add, in Xnews:
> "\s" - any whitespace character
> "\S" - any character that is not a whitespace character
> "\w" - any "word" character
> "\W" - any "non-word" character
> In order translate these you'd have to use square brackets:
> "[...]" - a set character range
> For example; "F[AST]" is equivalent to "FA", "FS", & "FT".
and fa fs ft Fa fA and so on ...
slrn - \<\cF[AST]\> ?
or maybe \c\<F[AST]\>
I do not know if slang supports \s etc, but from the other expressions my
guess would be not.
FS - for sale, FT - for trade, FA - ??
--
Thanks, Mike.
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Sat, 10 Jul 2004 00:47
Date: Sat, 10 Jul 2004 00:47
40 lines
1936 bytes
1936 bytes
On 9 Jul 2004 18:43:58 GMT, Tech Zero wrote: > The voice of "Mike Vanecek" drifted in on the cyber-winds, > from the sea of virtual chaos... >>> So, what is the slang equivalent of \b ? >> I think I have this one figured out >> \< - beginning of word >> \> - end of word >> So \< ... \> is the same as \b >> So, please forget the above question. The original poster had >> it correct and I was confused, but hopefully less so now ... > I should have worded it difrently... > \bflower -> \<flower > flower\b -> flower\> > Does that make sence? Uhm, I thought \<flower matched flower at the beginning of the word e.g., flower flowering but not sflower flower\> matched flower at the end of the word e.g., sflower xxxflower but not flowers I thought \b was the same as \<...\> e.g., match only flower not match flowers or aflower My confusion I guess about \b ? -- Thanks, Mike.
Re: [slrn] Scoring Problem
Author: SINNER
Date: Sat, 10 Jul 2004 01:09
Date: Sat, 10 Jul 2004 01:09
35 lines
2344 bytes
2344 bytes
* Mike Vanecek wrote in news.software.readers:
[...]
> and fa fs ft Fa fA and so on ...
> slrn - \<\cF[AST]\> ?
> or maybe \c\<F[AST]\>
> I do not know if slang supports \s etc, but from the other expressions my
> guess would be not.
> FS - for sale, FT - for trade, FA - ??
Here is what I use, seems to work most of time ;)
[dfw.forsale]
Score:: 101 % Free!
Subject: FF[^ie]
Subject: free
Score:: 100 % For Sale
Subject: F[ST][^BI]
Subject: s[ae]l[el]
Score:: 50 % Wanted
Subject: WT[BDFHST]
Subject: want[ed]
Subject: need[ed]
Score:: =40 % OT
Subject: [^A-Za-z]OT[^A-Za-z]
--
David
Re: [slrn] Scoring Problem
Author: »Q«
Date: Sat, 10 Jul 2004 01:22
Date: Sat, 10 Jul 2004 01:22
21 lines
1993 bytes
1993 bytes
Jens Wahnes <jewa@gmx.net> wrote in <news:slrncebcfq.tos.nsr@message-id.wahnes-world.de>: > slrn does not (currently) use Perl-style regular expressions but > s-lang regular expressions, so the xpressions you used are not > valid. It will if you use the PCRE module for S-Lang. <http://groups.google.com/groups?threadm=3e654a32%241%40hermes.arrowhead.com> Module available from the S-Lang ftp server: <ftp://space.mit.edu/pub/davis/misc/modules-1.4.8.tar.gz> Instead of trying to work with S-Lang regex, IMO you should all get the module up and running, then one of you should put together a nice howto about it, so that it will be easy for me once I get around to it. After all, making things easier for me is what Usenet is all about. ;) -- »Q«
Re: [slrn] Scoring Problem
Author: SINNER
Date: Sat, 10 Jul 2004 02:00
Date: Sat, 10 Jul 2004 02:00
27 lines
2492 bytes
2492 bytes
* »Q« wrote in news.software.readers: > Jens Wahnes <jewa@gmx.net> wrote in ><news:slrncebcfq.tos.nsr@message-id.wahnes-world.de>: >> slrn does not (currently) use Perl-style regular expressions but >> s-lang regular expressions, so the xpressions you used are not >> valid. > It will if you use the PCRE module for S-Lang. ><http://groups.google.com/groups?threadm=3e654a32%241%40hermes.arrowhead.com> > Module available from the S-Lang ftp server: ><ftp://space.mit.edu/pub/davis/misc/modules-1.4.8.tar.gz> > Instead of trying to work with S-Lang regex, IMO you should all get > the module up and running, then one of you should put together a > nice howto about it, so that it will be easy for me once I get around > to it. After all, making things easier for me is what Usenet is all > about. ;) Well, I gave it the Community College try and its Waaaaaayyy Over my head. -- David | AGM Favorites - http://tinyurl.com/loec Algebraic symbols are used when you do not know what you are talking about. -- Philippe Schnoebelen
Re: [slrn] Scoring Problem
Author: Blinky the Shark
Date: Sat, 10 Jul 2004 02:18
Date: Sat, 10 Jul 2004 02:18
19 lines
1463 bytes
1463 bytes
SINNER wrote:
> Well, I gave it the Community College try and its Waaaaaayyy Over my
> head.
Ayup. That's what's been happening, ever since They made them take down
that sign:
You have to be this tall to to enroll here.
____________________________________________________________
--
Blinky Linux Registered User 297263
Re: [slrn] Scoring Problem
Author: paf the dog
Date: Sat, 10 Jul 2004 02:49
Date: Sat, 10 Jul 2004 02:49
12 lines
1670 bytes
1670 bytes
Mike Vanecek grumbled:
>
> I have not been able to get {n} or \{n\} to work in slang. Either I am
> doing it incorrectly or it is not supported as well.
Mike, take a look here
http://dpobel.free.fr/man/html/affiche_man.php?id=3043
--
paf the dog
remove primate to reply
Re: [slrn] Scoring Problem
Author: Tech Zero
Date: Sat, 10 Jul 2004 08:14
Date: Sat, 10 Jul 2004 08:14
43 lines
2532 bytes
2532 bytes
The voice of "Mike Vanecek" drifted in on the cyber-winds, from the sea of virtual chaos... >> I should have worded it difrently... > >> \bflower -> \<flower >> flower\b -> flower\> > >> Does that make sence? > > Uhm, I thought > > \<flower matched flower at the beginning of the word > e.g., flower flowering but not sflower > > flower\> matched flower at the end of the word > e.g., sflower xxxflower but not flowers > > I thought \b was the same as \<...\> > e.g., match only flower not match flowers or aflower > > My confusion I guess about \b ? "\b" is a "word boundery", so it matches like "\<" or "\>" depending on where it's placed in relation to the word... >From http://www.s-lang.org/doc/html/slang-18.html... \< Match the beginning of a word. \> Match the end of a word. So... XNEWS PCRE slrn s-lang \bflower \<flower - Matches "flower" & "flowers", but not "deflower" flower\b flower\> - matches "flower" & "deflower", but not "flowers" \bflower\b \<flower\> - Only matches "flower" Has that cleared it up? -- The Tech Zero, Maxx "What's That Score" Pollare...
Re: [slrn] Scoring Problem
Author: Tech Zero
Date: Sat, 10 Jul 2004 08:19
Date: Sat, 10 Jul 2004 08:19
50 lines
2925 bytes
2925 bytes
The voice of "Mike Vanecek" drifted in on the cyber-winds,
from the sea of virtual chaos...
> I have not been able to get {n} or \{n\} to work in slang. Either
> I am doing it incorrectly or it is not supported as well.
>
> Hence, I am not sure how one would do 5 or more repeated
> characters except x. Also, grouping seems to require \(....\)?
> Actually, I am not sure how I would do any of the repeating
> patterns.
Desn't seen to be suported in s-lang... Oh well...
>> I should add, in Xnews:
>> "\s" - any whitespace character
>> "\S" - any character that is not a whitespace character
>> "\w" - any "word" character
>> "\W" - any "non-word" character
>
>> In order translate these you'd have to use square brackets:
>
>> "[...]" - a set character range
>
>> For example; "F[AST]" is equivalent to "FA", "FS", & "FT".
>
> and fa fs ft Fa fA and so on ...
>
> slrn - \<\cF[AST]\> ?
> or maybe \c\<F[AST]\>
I thought it was on default...
"http://www.s-lang.org/doc/html/slang-18.html"
\c turn on case-sensitivity (default)
\C turn off case-sensitivity
Dosn't that imply that all exprestions as "Case Sencitive" by default?
> I do not know if slang supports \s etc, but from the other
> expressions my guess would be not.
>
> FS - for sale, FT - for trade, FA - ??
FA - For Auction
--
The Tech Zero, Maxx "What's That Score" Pollare...
Re: [slrn] Scoring Problem
Author: Tech Zero
Date: Sat, 10 Jul 2004 08:39
Date: Sat, 10 Jul 2004 08:39
31 lines
2418 bytes
2418 bytes
> The voice of "Mike Vanecek" drifted in on the cyber-winds,
> from the sea of virtual chaos...
>
>> I have not been able to get {n} or \{n\} to work in slang. Either
>> I am doing it incorrectly or it is not supported as well.
>>
>> Hence, I am not sure how one would do 5 or more repeated
>> characters except x. Also, grouping seems to require \(....\)?
>> Actually, I am not sure how I would do any of the repeating
>> patterns.
>
> Desn't seen to be suported in s-lang... Oh well...
Ok, brain fart...
How about "\([a-wyz]\)\1\1\1\1\1"?
So something like "(\w\W\s?){7}" would translate to:
Subject: \C[a-z][^a-z] ?[a-z][^a-z] ?[a-z][^a-z] ?[a-z][^a-z] ?[a-z][^a-z] ?[a-z][^a-z] ?[a-z][^a-z] ?
(Does s-lang support "not within" brackets?)
And "\s\d{3,}$" could translate as:
Subject: [ ][0-9][0-9][0-9]+$
I think I'm getting the hang of this "s-lang" stuff. };8)
--
The Tech Zero, Maxx "What's That Score" Pollare...
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Sat, 10 Jul 2004 14:28
Date: Sat, 10 Jul 2004 14:28
48 lines
2581 bytes
2581 bytes
On Sat, 10 Jul 2004 01:09:53 GMT, SINNER wrote: > * Mike Vanecek wrote in news.software.readers: > [...] >> and fa fs ft Fa fA and so on ... >> slrn - \<\cF[AST]\> ? >> or maybe \c\<F[AST]\> >> I do not know if slang supports \s etc, but from the other expressions my >> guess would be not. >> FS - for sale, FT - for trade, FA - ?? > Here is what I use, seems to work most of time ;) > [dfw.forsale] > Score:: 101 % Free! > Subject: FF[^ie] Since slang defaults to case insensitive this is also the same as ff[^ie], right? Hence, this would match ff or FF or Ff or ... followed by any character other than ie or IE or iE and so on. I am not sure what that pattern is designed to catch. > Subject: free > Score:: 100 % For Sale > Subject: F[ST][^BI] > Subject: s[ae]l[el] > Score:: 50 % Wanted > Subject: WT[BDFHST] > Subject: want[ed] Does not this one match wante or wantd or WANTe or ... Would not \<want give you a better match? > Subject: need[ed] > Score:: =40 % OT > Subject: [^A-Za-z]OT[^A-Za-z] Why not \c\<ot\> for this? With case insensitivity, all that is needed is [^a-z] to rule out alpha upper and lower case characters? -- Thanks, Mike.
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Sat, 10 Jul 2004 14:33
Date: Sat, 10 Jul 2004 14:33
18 lines
1746 bytes
1746 bytes
On 10 Jul 2004 02:49:09 GMT, paf the dog wrote:
> Mike Vanecek grumbled:
>> I have not been able to get {n} or \{n\} to work in slang. Either I am
>> doing it incorrectly or it is not supported as well.
> Mike, take a look here
> http://dpobel.free.fr/man/html/affiche_man.php?id=3043
Thanks. I had also found a man page using google. It is essentially grep -r
except it defaults to case sensitive whereas slang does not.
It still appears that {n} or \{n\} is not supported in slang.
--
Thanks, Mike.
Re: [slrn] Scoring Problem
Author: SINNER
Date: Sat, 10 Jul 2004 14:59
Date: Sat, 10 Jul 2004 14:59
62 lines
3375 bytes
3375 bytes
* Mike Vanecek wrote in news.software.readers: > On Sat, 10 Jul 2004 01:09:53 GMT, SINNER wrote: >> * Mike Vanecek wrote in news.software.readers: >> [...] >>> and fa fs ft Fa fA and so on ... >>> slrn - \<\cF[AST]\> ? >>> or maybe \c\<F[AST]\> >>> I do not know if slang supports \s etc, but from the other expressions my >>> guess would be not. >>> FS - for sale, FT - for trade, FA - ?? >> Here is what I use, seems to work most of time ;) >> [dfw.forsale] >> Score:: 101 % Free! >> Subject: FF[^ie] > Since slang defaults to case insensitive this is also the same as ff[^ie], > right? Hence, this would match ff or FF or Ff or ... followed by any > character other than ie or IE or iE and so on. I am not sure what that pattern > is designed to catch. Correct. The word Office was caught so I added the I and I think the e was for offer. >> Subject: free >> Score:: 100 % For Sale >> Subject: F[ST][^BI] >> Subject: s[ae]l[el] >> Score:: 50 % Wanted >> Subject: WT[BDFHST] >> Subject: want[ed] > Does not this one match wante or wantd or WANTe or ... Would not \<want give > you a better match? Indeed it would, added ;) >> Subject: need[ed] >> Score:: =40 % OT >> Subject: [^A-Za-z]OT[^A-Za-z] > Why not \c\<ot\> for this? With case insensitivity, all that is needed is > [^a-z] to rule out alpha upper and lower case characters? Thanks! -- David | AGM Favorites - http://tinyurl.com/loec I've never been canoeing before, but I imagine there must be just a few simple heuristics you have to remember... Yes, don't fall out, and don't hit rocks.
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Sat, 10 Jul 2004 15:13
Date: Sat, 10 Jul 2004 15:13
83 lines
3698 bytes
3698 bytes
On 10 Jul 2004 08:19:51 GMT, Tech Zero wrote:
> The voice of "Mike Vanecek" drifted in on the cyber-winds,
> from the sea of virtual chaos...
>> I have not been able to get {n} or \{n\} to work in slang. Either
>> I am doing it incorrectly or it is not supported as well.
>> Hence, I am not sure how one would do 5 or more repeated
>> characters except x. Also, grouping seems to require \(....\)?
>> Actually, I am not sure how I would do any of the repeating
>> patterns.
> Desn't seen to be suported in s-lang... Oh well...
>>> I should add, in Xnews:
>>> "\s" - any whitespace character
>>> "\S" - any character that is not a whitespace character
>>> "\w" - any "word" character
>>> "\W" - any "non-word" character
>>> In order translate these you'd have to use square brackets:
>>> "[...]" - a set character range
>>> For example; "F[AST]" is equivalent to "FA", "FS", & "FT".
>> and fa fs ft Fa fA and so on ...
>> slrn - \<\cF[AST]\> ?
>> or maybe \c\<F[AST]\>
> I thought it was on default...
> "http://www.s-lang.org/doc/html/slang-18.html"
> \c turn on case-sensitivity (default)
> \C turn off case-sensitivity
> Dosn't that imply that all exprestions as "Case Sencitive" by default?
Yes, that is what I thought and was confused about the above. Evidently, the
above is not correct.
However, the example in score.txt
Score:: -1000
~Subject: \c[a-z]
{:
Subject: ^Re:
~Subject: ^Re:.*\c[a-z]
}
As the result, the example kills subject header lines that do not contain
lowercase characters, not counting an initial "Re:".
implies that \c is needed to test for lower case letters implying that case
insensitivity is the default.
Also, this score entry
[news.software.readers]
Score: 555
Subject: attn
scored this entry correctly --
2! - 555 [»Q« ]: 4 Re: Attn: Blinky, Boomer, et al
All my testing says that slrn/slang defaults to case insensitive.
>> I do not know if slang supports \s etc, but from the other
>> expressions my guess would be not.
>> FS - for sale, FT - for trade, FA - ??
> FA - For Auction
--
Thanks, Mike.
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Sat, 10 Jul 2004 15:28
Date: Sat, 10 Jul 2004 15:28
49 lines
2962 bytes
2962 bytes
On 10 Jul 2004 08:39:07 GMT, Tech Zero wrote:
>> The voice of "Mike Vanecek" drifted in on the cyber-winds,
>> from the sea of virtual chaos...
>>> I have not been able to get {n} or \{n\} to work in slang. Either
>>> I am doing it incorrectly or it is not supported as well.
>>> Hence, I am not sure how one would do 5 or more repeated
>>> characters except x. Also, grouping seems to require \(....\)?
>>> Actually, I am not sure how I would do any of the repeating
>>> patterns.
>> Desn't seen to be suported in s-lang... Oh well...
> Ok, brain fart...
> How about "\([a-wyz]\)\1\1\1\1\1"?
I will have to test it a bit more, but could not get that to work correctly.
Not sure what this means from the manual
However, in the current implementation,
the grouping operators are not used to group regular expressions to form a
single regular expression. Thus expression such as "\(hello\)*" is not a
pattern to match zero or more occurances of "hello" as it is in e.g., egrep.
> So something like "(\w\W\s?){7}" would translate to:
> Subject: \C[a-z][^a-z] ?[a-z][^a-z] ?[a-z][^a-z] ?[a-z][^a-z] ?[a-z][^a-z] ?[a-z][^a-z] ?[a-z][^a-z] ?
> (Does s-lang support "not within" brackets?)
Don't know. It is not listed as being supported explicitly in the doco. I
guess it is one more thing to test. Thus far, if it does not say it is
supported, I have found it is not supported.
> And "\s\d{3,}$" could translate as:
> Subject: [ ][0-9][0-9][0-9]+$
or maybe \ \d\d\d+$ not sure what the +$ will do though??
> I think I'm getting the hang of this "s-lang" stuff. };8)
--
Thanks, Mike.
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Sat, 10 Jul 2004 15:28
Date: Sat, 10 Jul 2004 15:28
49 lines
2510 bytes
2510 bytes
On 10 Jul 2004 08:14:47 GMT, Tech Zero wrote: > The voice of "Mike Vanecek" drifted in on the cyber-winds, > from the sea of virtual chaos... >>> I should have worded it difrently... >>> \bflower -> \<flower >>> flower\b -> flower\> >>> Does that make sence? >> Uhm, I thought >> \<flower matched flower at the beginning of the word >> e.g., flower flowering but not sflower >> flower\> matched flower at the end of the word >> e.g., sflower xxxflower but not flowers >> I thought \b was the same as \<...\> >> e.g., match only flower not match flowers or aflower >> My confusion I guess about \b ? > "\b" is a "word boundery", so it matches like "\<" or "\>" depending > on where it's placed in relation to the word... > From http://www.s-lang.org/doc/html/slang-18.html... > \< Match the beginning of a word. > \> Match the end of a word. > So... > XNEWS PCRE slrn s-lang > \bflower \<flower - Matches "flower" & "flowers", but not "deflower" > flower\b flower\> - matches "flower" & "deflower", but not "flowers" > \bflower\b \<flower\> - Only matches "flower" > Has that cleared it up? Yes, thank you. I had interpreted \b incorrectly. Did not know it was needed on both sides. -- Thanks, Mike.
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Sat, 10 Jul 2004 16:03
Date: Sat, 10 Jul 2004 16:03
19 lines
1490 bytes
1490 bytes
On 10 Jul 2004 08:39:07 GMT, Tech Zero wrote:
> (Does s-lang support "not within" brackets?)
It would appear so
Score: 556
Subject: attn[^a-z]
found this
12! % 556 [<Janice221]: 11 Re: Attn: Blinky, Boomer, et al
--
Thanks, Mike.
Re: [slrn] Scoring Problem
Author: Mike Vanecek
Date: Sat, 10 Jul 2004 16:03
Date: Sat, 10 Jul 2004 16:03
25 lines
1860 bytes
1860 bytes
On Sat, 10 Jul 2004 01:22:50 GMT, »Q« wrote: > Jens Wahnes <jewa@gmx.net> wrote in ><news:slrncebcfq.tos.nsr@message-id.wahnes-world.de>: >> slrn does not (currently) use Perl-style regular expressions but >> s-lang regular expressions, so the xpressions you used are not >> valid. > It will if you use the PCRE module for S-Lang. ><http://groups.google.com/groups?threadm=3e654a32%241%40hermes.arrowhead.com> > Module available from the S-Lang ftp server: ><ftp://space.mit.edu/pub/davis/misc/modules-1.4.8.tar.gz> > Instead of trying to work with S-Lang regex, IMO you should all get > the module up and running, then one of you should put together a > nice howto about it, so that it will be easy for me once I get around > to it. After all, making things easier for me is what Usenet is all > about. ;) Ah, one more toy to play with ... -- Thanks, Mike.
Re: [slrn] Scoring Problem
Author: paf the dog
Date: Sun, 11 Jul 2004 02:20
Date: Sun, 11 Jul 2004 02:20
17 lines
1977 bytes
1977 bytes
Mike Vanecek grumbled:
>
>> http://dpobel.free.fr/man/html/affiche_man.php?id=3043
>
> Thanks. I had also found a man page using google. It is essentially
> grep -r except it defaults to case sensitive whereas slang does not.
I deduced more fundamental differences than this but it's OT
> It still appears that {n} or \{n\} is not supported in slang.
this was what I meant actually, you appeared to still wonder about it.
But I may have missunderstood.
--
paf the dog
remove primate to reply
Re: [slrn] Scoring Problem
Author: Tech Zero
Date: Sun, 11 Jul 2004 21:14
Date: Sun, 11 Jul 2004 21:14
29 lines
2514 bytes
2514 bytes
The voice of "Mike Vanecek" drifted in on the cyber-winds,
from the sea of virtual chaos...
> Yes, that is what I thought and was confused about the above.
> Evidently, the above is not correct.
>
> However, the example in score.txt
>
> Score:: -1000
> ~Subject: \c[a-z]
> {:
> Subject: ^Re:
> ~Subject: ^Re:.*\c[a-z]
> }
This could be simplified to just "\c[a-df-z]", since you'd rarely find
a spam with just uppercase "E"s as the subject... };8)
> As the result, the example kills subject header lines that do not
> contain lowercase characters, not counting an initial "Re:".
> implies that \c is needed to test for lower case letters implying
> that case insensitivity is the default.
Not really... Case sensitivity could be turned on or off somewhere in
else in slrn (not that I've checked). But the "\c" "\C" miss-entry in
the help pages is annoying.
--
The Tech Zero, Maxx "What's That Score" Pollare...
Page 1 of 2 • 55 total messages
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads