Article View: news.software.readers
Article #195255[Xnews] Scoring on items in any order
From: NickC
Date: Tue, 06 Feb 2007 02:25
Date: Tue, 06 Feb 2007 02:25
38 lines
1994 bytes
1994 bytes
I'd appreciate some help with scoring on two items that can appear in
any order in the Xref header.
The task is to score a hit when both items appear in any order and with
unknown characters in between, or to restate, when both items appear
somewhere within the header.
I want to kill any post that is cross-referenced to both politics and
invest groups. This could work:
Score: -9999
Xref: politics
Xref: invest
but I've had problems getting Xnews successfully to score AND
conditions on the same header, plus I'm trying to get into advanced
pcre so prefer to do it using, say, conditional and lookahead/behind
expressions. For example, in pseudo-code:
if politics
if ahead is invest or behind is invest
else if invest
if ahead is politics or behind is politics
Xref:
(?(politics)(?=.*invest|?<=invest.*)|(?(invest)(?=.*politics|?<=politic
s.*)))
but that seems clumsy to solve a problem that must come up often in reg
ex, so I think I'm missing something obvious.
BTW, if someone knows a good regex group or a website, I'd appreciate
the link.
Thanks for any help,
--
Nick
Technical Details
Message-ID:
<Xns98CF889D22F81drizzeniinetnetau@203.16.214.243>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!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!sn-xt-sjc-03!sn-xt-sjc-01!sn-post-sjc-02!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <Xns98CF889D22F81drizzeniinetnetau@203.16.214.243> Subject: [Xnews] Scoring on items in any order Date: Tue, 06 Feb 2007 02:25:49 -0000 From: NickC <spambucketREMOVE_THIS@internode.on.net> 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!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!sn-xt-sjc-03!sn-xt-sjc-01!sn-post-sjc-02!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Newsgroups: news.software.readers Organization: Posted via Supernews, http://www.supernews.com User-Agent: Xnews/2006.08.24 X-Complaints-To: abuse@supernews.com Lines: 38