[tin-users] Help for filtering regex
Urs Janßen
urs at tin.org
Fri Oct 20 18:06:27 CEST 2017
On Fri, Oct 20, 2017 at 02:21:17PM +0200, Joe wrote:
> Now, the first question is: what REGEX types does tin supports?
perl compatible (pcre is used as engine) if wildcard=1 in tinrc.
> grep -P 'John\s\b(?!Samuelson).*son\b' input-names.txt
lookahead paterns are supported, so that
group=*
case=0
score=kill
from=John\s\b(?!Samuelson).*son\b
should work or you could use scooring
give enery article that matches
John\s+.*son\b a score of eg -100
and the ones which match
John\sSamuelson a score of 100
at the end John\sSamuelson gets a score of 0 as he matches both filters
so his articles are "untouched", but the other John *son are killed.
group=*
case=0
score=kill
from=John\s+.*son\b
group=*
case=0
score=hot
from=John\sSamuelson\b
More information about the tin-users
mailing list