🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
3 messages
3 total messages Started by Lewis Sat, 16 May 2020 13:35
[slrn] scoring
#264122
Author: Lewis
Date: Sat, 16 May 2020 13:35
36 lines
1665 bytes
I am trying to match for a specific string followed by a space in the
From header

Let's say, the name ATTENTION.

I want to match

"From: ATTENTION " followed by anything else

I do not want to match any of the following:
"From: Joe ATTENTION "
"From: ATTENTION-DEFICIT "
"From: Mr ATTENTION "

I have tried

   From:[ ]ATTENTION[ ]
   From:\ ATTENTION\
   From: ATTENTION[ ]
   From: \<ATTENTION\>

none match. (placed as first entries in the score file)

According to <http://www.jedsoft.org/slang/doc/html/slang-22.html>

[ ... ] matches any single character between brackets.
\<                Match the beginning of a word.
\>                Match the end of a word.

Also, I don't see how to specify a position in the From header for the
"Mr ATTENTION" example above.

-- 
"Are you pondering what I'm pondering?"
"I think so, Brain, but wouldn't his movies be more suitable for
	children if he was named Jean-Claude van Darn?"
Re: [slrn] scoring
#264131
Author: Marcel Logen
Date: Sat, 16 May 2020 16:17
34 lines
2161 bytes
Lewis in news.software.readers:

>I am trying to match for a specific string followed by a space in the
>From header
>
>Let's say, the name ATTENTION.
>
>I want to match
>
>"From: ATTENTION " followed by anything else

What about

   From: ATTENTION .*

or

   From: ^ATTENTION .*$

?

<http://slrn.sourceforge.net/docs/score.html> says:

| A keyword line begins with the name of the keyword
| followed immediately by one or two colons and one space.
| The rest of the line usually consists of a regular
| expression.

Marcel
-- 
  ╭─╮ ╭───╮    ╭────────╮         ╭──╮ ╭─────────╮   ╭────╮    ╭────────
╭─╯ ╰─╯   │    ╰─────╮  │  ╭──╮   │  ╰─╯         │   ╰──╮ ╰─╮  ╰────╮   
╯         │  ╭─╮  ╭──╯  │  │  │   │              │ ╭─╮  ╰─╮ │  ╭────╯   
          ╰──╯ ╰──╯     ╰──╯  ╰───╯              ╰─╯ ╰────╯ ╰──╯        
Re: [slrn] scoring
#264132
Author: Lewis
Date: Sat, 16 May 2020 18:19
37 lines
1608 bytes
In message <slrnrbvr12.1uco.g.kreme@ProMini.lan> Lewis <g.kreme@gmail.com.dontsendmecopies> wrote:
> I am trying to match for a specific string followed by a space in the
> From header

> Let's say, the name ATTENTION.

> I want to match

> "From: ATTENTION " followed by anything else

> I do not want to match any of the following:
> "From: Joe ATTENTION "
> "From: ATTENTION-DEFICIT "
> "From: Mr ATTENTION "

> I have tried

>    From:[ ]ATTENTION[ ]
>    From:\ ATTENTION\
>    From: ATTENTION[ ]
>    From: \<ATTENTION\>

Well, that was dump.

In testing I had various patterns in an OR match. Or so I thought.

{:
 pattern
 pattern
 pattern
}

instead of {::

-- 
This above all, to thine own self be true And it must follow, as the
	night the day, Thou canst not then be false to any man.
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