🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #149402

Re: [Xnews] HELP - Selectivly allowing cross-posts?

#149402
From: »Q«
Date: Sat, 05 Jun 2004 12:56
54 lines
3182 bytes
Tech Zero <spamnet-june@dragonfur.ca> wrote in
<news:Xns94FF2A78E722FZeroOne@raven.dragonfur.ca>:

> So I did what I've done before, and spent the last few days (read:
> sleepless nights) beefing up my Score.ini,

You are one tenacious dragon!

> which lead me to my  question:  Is there a way to selective allow
> cross-posts to only certain groups in a single line entry?
>
> One of the entries I'm using:
>   [^alt\.fan\.dragons$]
>   Score: -2700
>      Xref: (.*:){2}
>      ~Xref: furry|magick|mythology
>
> I'd like to drop it to a single "Xref" test, so I can test other
> entries if first condition is false, but I haven't had any luck
> yet.

If I'm reading you correctly (just started first cup of coffee), I
think this will do what you want:

Xref: (?!.*?(furry|magick|mythology))(.*?:){2}

That's a relatively expensive regex;  it may require looking through
the entire field up to four times.  Maybe limit it to the one
server which carries the problem posts.

Xref: ^news\.server\.address\s(?!.*?(furry|magick|mythology))(.*?:){2}

> I suspect it has something to do with PCRE "Look ahead/behind
> assertion", but I've just started use those Regex entries, and the
> first few tests (read: dozen of so) didn't work as expected.

As you can see above, I think a negative lookahead is the way to go.
Since we don't know where in the string (furry|magick|mythology) may
occur, I used (?!.*? at the beginning, to look through the entire
string.

Lookbehinds are a PiTA, at least for me, because of the limitation
of looking for a string of fixed length.  I find I never need
positive lookaheads/behinds for Xnews scoring, only negative ones.
I don't use them much, and can't think of any further possibly
useful comments to make.

> The rest of the new entries are online, and any suggestions are
> welcome:  http://www.dragonfur.ca/nowhere/score.ini.txt

Thanks again for maintaining that online for everyone's benefit.

-- 
»Q«
Technical Details
Message-ID: <MrQ94FF50D66AB90itsmeitsQ@QsFQDN.dyndns.org>
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!internal1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!not-for-mail
References: <Xns94FF2A78E722FZeroOne@raven.dragonfur.ca>

Show Full Headers
Complete Article Headers
Message-ID: <MrQ94FF50D66AB90itsmeitsQ@QsFQDN.dyndns.org>
Subject: Re: [Xnews] HELP - Selectivly allowing cross-posts?
Date: Sat, 05 Jun 2004 12:56:48 GMT
From: »Q« <boxcars@gmx.net>
References: <Xns94FF2A78E722FZeroOne@raven.dragonfur.ca>
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!internal1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!not-for-mail
Newsgroups: news.software.readers
Organization: we don't need no stinkin' organization
Lines: 54
X-Trace: news.uni-berlin.de AAvJiXU3vFUYdKdS+/AoPwNenDCLIMV2BncxLWTA/PVdRXchcC
X-Orig-X-Complaints-To: <http://www.cybergecko.com/complain.htm>
X-Face: *#`F(_&o, GRH~~$V&ByU1LZAWc]JgxuT`Pv2y0`&JE`(=*PcC>#m2]xv]p,
 i|9mDJ+8dGMJl`V[!z]\N}qrLTHjU]Sew>rQBShT_8.(0Q(iH,
 Gu7k|y/)^!@oVydVrix*#|-|u2~zgA'U3nQ_fa#jXvcGL[9f:>8?U=hXYK3D~*}Gq$TjPe1WXEFLGTiB3ot!oMH"'(Jop0(\0C