🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #115998

Re: [Xnews] groups.ini question

#115998
From: Murray Peterson
Date: Fri, 13 Dec 2002 06:45
55 lines
3149 bytes
"Scott A." <res1iphq.nospam@verizon.net> wrote in
news:Xns92E2CDF8ED0C5mamacasscom@199.45.49.11: 

> How can I do an AND or a NOT in the Group Expressions?
> 
> Here's my situation:  I have some settings in groups.ini under the
> heading [binaries].  However, I want those settings to be ignored for
> groups that end in ".d".  Is there a way to tell it [binaries] and not
> [\.d$], or is there a workaround?  I guess I could set up a [\.d$]
> rule that tells it specifically what to do, but it would be more
> effective if I could just tell it not to apply the [binaries]
> settings. 
> 
> I'm kind of new at these expressions, so I'm sorry if this is
> elementary.  I've been trying all day to figure this out.
> 
> Some of the groups in question (in case you need an example to help
> figure this out) are alt.binaries.sounds.mp3 and
> alt.binaries.sounds.mp3.d.  I want the  discussion group (.d) to be
> treated as a regular text group. 

The easiest way for you to solve your problem is to specify the groups a 
bit more exactly within the header.  E.G.

Instead of:
    	[binaries]
try this:
    	[binaries.sounds.mp3$|binaries.sounds.mp3.1960s$]
Or just this:
    	[mp3$|1960s$]

The $ prevents the expression from matching any group that ends in .d (or 
anything else not specified in the expression).

You can also use a negative look-ahead expression (see pcre.html for a full 
explanation).

    	[mp3(?!\.d$)]
will match all strings containing mp3 EXCEPT those that are followed by 
".d".  I find this variation to be less useful than the previous example 
since very few groups end in just "mp3" or "mp3.d".

I haven't actually tried this one, but a negated look-behind assertion may 
do the trick:
    	[~(?<!binaries).*\.d$]

the "(?<!binaries).*\.d$" will match all strings that contain "binaries" 
and end in ".d".  The "~" negation would then invert this.  Again, read 
pcre.html for the full details of assertions.

-- 
Murray Peterson
Email: murray_peterson@shaw.ca (remove underscore)
URL:   http://members.shaw.ca/murraypeterson/
Technical Details
Message-ID: <Xns92E2F207EA30farkle@24.71.223.159>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!lnsnews.lns.cornell.edu!newsstand.cit.cornell.edu!news.stealth.net!news.stealth.net!prodigy.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!news2.calgary.shaw.ca.POSTED!not-for-mail
References: <Xns92E2CDF8ED0C5mamacasscom@199.45.49.11>

Show Full Headers
Complete Article Headers
Message-ID: <Xns92E2F207EA30farkle@24.71.223.159>
Subject: Re: [Xnews] groups.ini question
Date: Fri, 13 Dec 2002 06:45:03 GMT
From: Murray Peterson <mwp@home.com.invalid>
References: <Xns92E2CDF8ED0C5mamacasscom@199.45.49.11>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!lnsnews.lns.cornell.edu!newsstand.cit.cornell.edu!news.stealth.net!news.stealth.net!prodigy.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!news2.calgary.shaw.ca.POSTED!not-for-mail
X-Trace-PostClient-IP: 68.145.202.240
Newsgroups: news.software.readers
Organization: None
User-Agent: Xnews/5.04.25
Lines: 54
NNTP-Posting-Host: 24.71.223.147
X-Complaints-To: abuse@shaw.ca
X-Trace: news2.calgary.shaw.ca 1039761903 24.71.223.147 (Thu, 12 Dec 2002 23:45:03 MST)
NNTP-Posting-Date: Thu, 12 Dec 2002 23:45:03 MST