Article View: news.software.readers
Article #199500Re: [XNews] A question: How to filter?
From: Peter J Ross
Date: Wed, 16 May 2007 13:00
Date: Wed, 16 May 2007 13:00
54 lines
3050 bytes
3050 bytes
In news.software.readers on Mon, 14 May 2007 18:12:04 -0600, Tech Zero
<uselesspam@dragonfur.ca> wrote:
> Reality folded in on itself, and somewhere the following words from
> "Peter J Ross" appeared in history:
>
>> And finally, a rather advanced one to catch plurals and
>> misspellings, which some study of the XNews documentation should
>> explain:
>>
>> Subject: \b(casino(s|es)?|lot{1,2}er(y|ies)|bingo)\b
>> % matches the words casino, casinos, casinoes, lottery,
>> % lotteries, lotery, loteries and bingo, and nothing else.
>>
>> You can match all the words in separate rules if you find it
>> easier, but after learning how to walk, learning how to run can be
>> fun too.
>
> Probability falls into play when creating good entries. All that
> extra regex won't do any harm, but it will not add anything of use
> either.
Sure, but I was deliberately contriving something complicated as an
example of the complexity that's possible if needed. All the OP's
request needs is "casino" or possibly "casino\b"
> For the same affect, minus the extras, this should do:
>
> Score: -9000
> Subject: casino|lott?er[yi]|bingo
>
> The reason?
>
> Adding "(s|es)?" is only need if you lock in the term with a bondary,
> it would have been better to leave it outside rather then incure four
> loops to test for a matching entery.
>
> Using "?" for an optional charictor is just cleaner then using
> repitition.
Yes. But I wanted to include "{1,2}" just to show that the syntax
exists.
> And as long as your not using "/b" there is no real need
> to look for "(y|ies)", or probably not even "[yi]".
"plotter" and "blotter" would match "lott?er".
> Call me a minamilist, but I like readable entries.
I like highly compressed ones. They're pretty!
--
PJR :-)
Technical Details
Message-ID:
<slrnf4m02n.2so.pjr@pjr.gotdns.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!number6.nntp.dca.giganews.com!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon02.news.prodigy.net!prodigy.net!news.glorb.com!news-out.octanews.net!indigo.octanews.net!authen.yellow.readfreenews.net.POSTED!not-for-mailReferences:
<Xns992B7A2FA1AC4erictzoneabpeg@216.151.153.66> <slrnf48rmc.3db.pjr@pjr.gotdns.org> <Xns9930B92759B95AlphaTwo@draken.dragonfur.ca>Show Full Headers
Complete Article Headers
Message-ID: <slrnf4m02n.2so.pjr@pjr.gotdns.org> Subject: Re: [XNews] A question: How to filter? Date: Wed, 16 May 2007 13:00:31 +0000 From: Peter J Ross <pjr@example.invalid> References: <Xns992B7A2FA1AC4erictzoneabpeg@216.151.153.66> <slrnf48rmc.3db.pjr@pjr.gotdns.org> <Xns9930B92759B95AlphaTwo@draken.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!number6.nntp.dca.giganews.com!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon02.news.prodigy.net!prodigy.net!news.glorb.com!news-out.octanews.net!indigo.octanews.net!authen.yellow.readfreenews.net.POSTED!not-for-mail Newsgroups: news.software.readers Reply-To: pjr.spam@gmail.com User-Agent: slrn/0.9.8.1pl2 (Debian) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 54 Organization: Read Free News NNTP-Posting-Date: 16 May 2007 08:00:31 CDT X-Trace: DXC==B]7HK<@NSdPX:=PWWfaAn]AGWjF5PjPi465Ue@WB_5oK2^di:NC?4h26Z<EbT:a\elV3mi\haFgh3V78HOHRTYoX^RoV\I@R:g