🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #199454

Re: [XNews] A question: How to filter?

#199454
From: Tech Zero
Date: Tue, 15 May 2007 00:12
41 lines
2780 bytes
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.

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. And as long as your not using "/b" there is no real need
to look for "(y|ies)", or probably not even "[yi]".

Call me a minamilist, but I like readable entries.

-- 
__ __| |            __ __|           |    __  /
   |     \    -_)      |   -_)   _|    \     /    -_)   _| _ \
  _|  _| _| \___|     _| \___| \__| _| _| ____| \___| _| \___/
Losing quality sleep helping others on-line since 1997...
Technical Details
Message-ID: <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!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
References: <Xns992B7A2FA1AC4erictzoneabpeg@216.151.153.66> <slrnf48rmc.3db.pjr@pjr.gotdns.org>

Show Full Headers
Complete Article Headers
Message-ID: <Xns9930B92759B95AlphaTwo@draken.dragonfur.ca>
Subject: Re: [XNews] A question: How to filter?
Date: Mon, 14 May 2007 18:12:04 -0600
From: Tech Zero <uselesspam@dragonfur.ca>
References: <Xns992B7A2FA1AC4erictzoneabpeg@216.151.153.66> <slrnf48rmc.3db.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!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
User-Agent: Hamster/2.1.0.11 Xnews/2006.03.07
X-Face: }2a:86~fids1(+)NSk]$?SqH(7<%l,URI]qy%%.4O]rYF&7aeXt,vC%i`TGlSWHr&v]amN[1^X"p0$?&3`az-l>nq\y5}ADu+TJ%\{[)`H"X}yx`zpMe^V*JyI~)WcA-6Mb#Qh>}?{cyxK!"G\#"I5&H\FrFy[c9usZ<#'"nvV[;
 34_qR9](uXc,NLS?JRGg/.&1=
Lines: 41
Organization: Read Free News
NNTP-Posting-Date: 14 May 2007 19:12:08 CDT
X-Trace: DXC=X5`12]?DMS?\?EKWC1nm7:]AGWjF5PjP9465Ue@WB_5?b`9bMQFD5M4C_@6Qi6a>@3hQI`CHWgad3mga[W_3lIn:ChBaM?8f;
 N3