Article View: news.software.readers
Article #190886Re: [Pan] filter help
From: Peter J Ross
Date: Thu, 21 Sep 2006 12:41
Date: Thu, 21 Sep 2006 12:41
45 lines
2405 bytes
2405 bytes
On Sun, 17 Sep 2006 04:46:30 +0000 (UTC), Mike Dee
<emteedee@invalid.invalid> wrote in news.software.readers:
> Peter J Ross <pjr@kookbusters.org> wrote in
> news:slrnegnrpr.4jb.pjr@nntp.alcatroll.com:
>
>>> ~Subject: \bpan\b|slrn|xnews.*(filte|\bkill|pcre|scor)
>>
>> But this kills subjects like "filters in xnews". Instead,
>>
>> \bpan\b|slrn|((xnews)?.*(filte|\bkill|pcre|scor)(?(1).*|\1))
>>
>> should match both "xnews filters" and "filters in xnews", as long
>> as pcre-style back references and conditional subpatterns are
>> implemented. (If not, just add another, reversed subpattern.)
>
> I could not get this to work, as is.
That's because it's broken. (:blush emoticon:)
Try this instead:
\bpan\b|slrn|(xnews)?.*(filte|\bkill|pcre|scor).*(?(1).*|\1)
In general form,
(foo)?.*bar.*(?(1).*|\1)
should match both "foo[...]bar" and "bar[...]foo".
Of course,
foo.*bar|bar.*foo
has the same effect in any regex implementation that supports the OR
operator, but has no Geek Cred at all.
PJR :-)
--
_ _(o)_(o)_ _ | The fool hath said in his heart, "There is no Cabal."
._\`:_ F S M _:' \_, | FSM: <http://www.venganza.org/>
/ (`---'\ `-. | AUK: <http://www.netcabal.com/auk/>
,-` _) (_, F_P | PJR: <http://insurgent.org/~pjr/>
Technical Details
Message-ID:
<slrneh523g.4bq.pjr@nntp.alcatroll.com>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!wn12feed!worldnet.att.net!207.14.113.39!news.alt.net!nntp.alcatroll.com!not-for-mailReferences:
<pan.2006.09.10.10.45.18.473064@Thank.You> <pan.2006.09.10.13.19.10.763936@emteedee.invalid> <pan.2006.09.14.10.52.03.166221@Thank.You> <Xns983F8C28A6185emteedeemotzarella@85.31.186.76> <slrnegnrpr.4jb.pjr@nntp.alcatroll.com> <Xns9841964BDE457emteedeemotzarella@85.31.186.76>Show Full Headers
Complete Article Headers
Message-ID: <slrneh523g.4bq.pjr@nntp.alcatroll.com> Subject: Re: [Pan] filter help Date: Thu, 21 Sep 2006 13:41:06 +0100 From: Peter J Ross <pjr@kookbusters.org> References: <pan.2006.09.10.10.45.18.473064@Thank.You> <pan.2006.09.10.13.19.10.763936@emteedee.invalid> <pan.2006.09.14.10.52.03.166221@Thank.You> <Xns983F8C28A6185emteedeemotzarella@85.31.186.76> <slrnegnrpr.4jb.pjr@nntp.alcatroll.com> <Xns9841964BDE457emteedeemotzarella@85.31.186.76> 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!wn12feed!worldnet.att.net!207.14.113.39!news.alt.net!nntp.alcatroll.com!not-for-mail Newsgroups: news.software.readers Organization: Cabal Obsidian Order [TINCOO] Lines: 45 X-Operating-System: Debian GNU/Linux (Sid/Unstable) X-Kernel: Linux 2.6.17-2-686 User-Agent: slrn/0.9.8.1pl1 (Debian)