Discussion:
[slrn[ score question
(too old to reply)
Lewis
2021-12-03 18:53:25 UTC
Permalink
It's been a long time since I first setup my slrn scroe file, and when
looking through it today I came across this and realized I don't
remember what it manes anymore, though it seemed important at the time
as it it near the top of the score file.

Score:: -800
~Subject: \c[a-z]
{:
Subject: ^Re:
~Subject: ^Re:.*\c[a-z]
}

Heck I can't even remember how Score:: is different from Score::
--
S is for SUSAN who perished of fits
T is for TITUS who flew into bits
Adam Funk
2021-12-04 13:21:32 UTC
Permalink
Post by Lewis
It's been a long time since I first setup my slrn scroe file, and when
looking through it today I came across this and realized I don't
remember what it manes anymore, though it seemed important at the time
as it it near the top of the score file.
Score:: -800
~Subject: \c[a-z]
~Subject: ^Re:.*\c[a-z]
}
'Score:' is an AND (the rule fires if all the conditions are met);
'Score::' is an OR (the rule fires if any condition is met).

And you can nest the boolean operators with the brackets. Here's a
weird example I found in my score file:

Score: 45
{::
Subject: chemical
Subject: chemistry
Subject: lab
}
{::
Subject: supplier
Subject: supplies
Subject: supply
}

That will match any post whose Subject contains one or more word from
each list (in any order).

I don't remember what the \c in your example does, but I'm curious!
--
While outside on the turnpike
They got this new hit tune
Thrills become as cheap as gas
And gas as cheap as thrills
Lewis
2021-12-04 14:13:30 UTC
Permalink
Post by Adam Funk
Post by Lewis
It's been a long time since I first setup my slrn scroe file, and when
looking through it today I came across this and realized I don't
remember what it manes anymore, though it seemed important at the time
as it it near the top of the score file.
Score:: -800
~Subject: \c[a-z]
~Subject: ^Re:.*\c[a-z]
}
'Score:' is an AND (the rule fires if all the conditions are met);
'Score::' is an OR (the rule fires if any condition is met).
I thought the : and :: applied to subclauses like in your example. I
just didn't remember you could do it on the Score line. I usually
manually create

Score: #
{::
list of or matches
}
Post by Adam Funk
And you can nest the boolean operators with the brackets. Here's a
Score: 45
Subject: chemical
Subject: chemistry
Subject: lab
}
Subject: supplier
Subject: supplies
Subject: supply
}
That will match any post whose Subject contains one or more word from
each list (in any order).
I don't remember what the \c in your example does, but I'm curious!
Me too!
--
Si Hoc Legere Scis Nimium Eruditionis Habes
Adam Funk
2021-12-04 19:21:52 UTC
Permalink
Post by Lewis
Post by Adam Funk
Post by Lewis
It's been a long time since I first setup my slrn scroe file, and when
looking through it today I came across this and realized I don't
remember what it manes anymore, though it seemed important at the time
as it it near the top of the score file.
Score:: -800
~Subject: \c[a-z]
~Subject: ^Re:.*\c[a-z]
}
'Score:' is an AND (the rule fires if all the conditions are met);
'Score::' is an OR (the rule fires if any condition is met).
I thought the : and :: applied to subclauses like in your example. I
just didn't remember you could do it on the Score line. I usually
manually create
I know Score:: is OR because I have rules that work, e.g.,

Score:: +10
Post by Lewis
Score: #
list of or matches
}
Post by Adam Funk
And you can nest the boolean operators with the brackets. Here's a
Score: 45
Subject: chemical
Subject: chemistry
Subject: lab
}
Subject: supplier
Subject: supplies
Subject: supply
}
That will match any post whose Subject contains one or more word from
each list (in any order).
I don't remember what the \c in your example does, but I'm curious!
Me too!
Well, let me know if you find out!
--
is it any wonder that my mind's on fire,
imprisoned by the thoughts of what to do?
Tavis Ormandy
2021-12-04 15:31:29 UTC
Permalink
Post by Lewis
~Subject: \c[a-z]
The tilde means the rule is inverted and \c means to enable case
sensitivity, so this only matches if the subject was ALL CAPS.
This starts a group, all of the rules in the group have to match.
Post by Lewis
~Subject: ^Re:.*\c[a-z]
This is adding an exception for Re:, so Re: ALL CAPS still matches the
rule!
Post by Lewis
}
You can also add a comment, like Score: -100 % All CAPS, then when you
show the score view (v), it tells you which scores matched! This is
really handy if you have a bunch of complicated rules and not sure what
caused a score to be so high/low.

Tavis.
--
_o) $ lynx lock.cmpxchg8b.com
/\\ _o) _o) $ finger ***@sdf.org
_\_V _( ) _( ) @taviso
Lewis
2021-12-05 05:23:42 UTC
Permalink
Post by Tavis Ormandy
Post by Lewis
~Subject: \c[a-z]
The tilde means the rule is inverted and \c means to enable case
sensitivity, so this only matches if the subject was ALL CAPS.
Ah, that makes sense I knew that once.`
Post by Tavis Ormandy
You can also add a comment, like Score: -100 % All CAPS
Yes, I gave done that on many newer rules, but not on some of the
originals (I may not have known about commenting back then and didn't go
back and do it when I should have).

Thanks for the explanation.
--
Bart, don't use the Touch of Death on your sister.
Lewis
2021-12-05 23:24:07 UTC
Permalink
Post by Lewis
Post by Tavis Ormandy
Post by Lewis
~Subject: \c[a-z]
The tilde means the rule is inverted and \c means to enable case
sensitivity, so this only matches if the subject was ALL CAPS.
Ah, that makes sense I knew that once.`
Post by Tavis Ormandy
You can also add a comment, like Score: -100 % All CAPS
Yes, I gave done that on many newer rules, but not on some of the
originals (I may not have known about commenting back then and didn't go
back and do it when I should have).
It's just like putting comments in programs --- by the time you
realize you need them to figure out what you meant, it's too late.
Nah, as it turns out they are better because the comments are shown when
you look at the score details while in slrn.
--
"Are you pondering what I'm pondering?"
"Uh, I think so Brain, but this time, you wear the tutu."
Jeremy Brubaker
2021-12-09 18:55:42 UTC
Permalink
Post by Tavis Ormandy
Post by Lewis
~Subject: \c[a-z]
The tilde means the rule is inverted and \c means to enable case
sensitivity, so this only matches if the subject was ALL CAPS.
Why can't the first line be Subject: \c[A-Z] instead? And doesn't that
only match one-word subjects? I've been trying to figure out how to kill
all-caps From: and Subject: and I'm not sure I have it correct.
Post by Tavis Ormandy
This starts a group, all of the rules in the group have to match.
Post by Lewis
~Subject: ^Re:.*\c[a-z]
This is adding an exception for Re:, so Re: ALL CAPS still matches the
And why can't this just be Subject: ^Re:.*\c[A-Z]? (with the appropriate
altering of the AND/OR blocks)

Clearly regex are not my strong suit.
--
() www.asciiribbon.org | Jeremy Brubaker
/\ - against html mail | јЬruЬаkе@оrіоnаrtѕ.іо / neonrex on IRC

"Humor is a drug which it's the fashion to abuse." -- William Gilbert
Tavis Ormandy
2021-12-10 06:37:22 UTC
Permalink
Post by Jeremy Brubaker
Post by Tavis Ormandy
Post by Lewis
~Subject: \c[a-z]
The tilde means the rule is inverted and \c means to enable case
sensitivity, so this only matches if the subject was ALL CAPS.
Why can't the first line be Subject: \c[A-Z] instead?
That would match any subject with a capital letter (rather than any
subject *without* a lowercase letter).

You're probably thinking of something like \c^[A-Z]+$ (nothing but
capital letters)... It works, but then a space or punctuation "OH
YEAH!!!!" gets through... so "no lowercase" is just a less messy
way of saying "only uppercase or punctuation or spaces or symbols or
..." :)

Tavis.
--
_o) $ lynx lock.cmpxchg8b.com
/\\ _o) _o) $ finger ***@sdf.org
_\_V _( ) _( ) @taviso
Loading...