Article View: news.software.readers
Article #87038Re: [X-News] How do I filter out all crossposted messages?
From: Robert Amesz
Date: Sat, 10 Nov 2001 00:57
Date: Sat, 10 Nov 2001 00:57
32 lines
2119 bytes
2119 bytes
Murray Peterson wrote:
> [counting colons]
>
> You don't want to search for spaces in the xref header, but a colon
> followed by a number. E.G.:
>
> Xref: (.*:\d+){2,}
Might I suggest changing this to
Xref: ([^:]+:\d+){2}
for performance reasons? Due to the greedy nature of * or + writing
it the way you did might lead to a lot of unneccessary backtracking
behaviour. Also, there's no need to check beyond the minimum number
of repetitions anyway, as the matched part of the header isn't used
for anything, so we might as well go for a minimal match.
A minor point, perhaps, but regular expressions can turn and bite you
if you're not careful.
Alternatively, if the friggin' crossposters always crosspost to the
same group, say 'alt.clueless', you could just use:
Xref: alt\.clueless
and you'll never have to see their ugly X-faces again.
Robert Amesz
Technical Details
Message-ID:
<Xns915512B6C4261rcamesz@amesz.demon.nl>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!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mailReferences:
<Xns91519599722E9atreidessovernet@64.154.60.173> <Xns9153F04F88345grahamdrabblelineone@ID-77355.user.dfncis.de> <Xns91545BBA689B0canttouchthis@213.228.0.136> <Xns915413028CE1farkle@24.71.223.45>Show Full Headers
Complete Article Headers
Message-ID: <Xns915512B6C4261rcamesz@amesz.demon.nl>
Subject: Re: [X-News] How do I filter out all crossposted messages?
Date: Sat, 10 Nov 2001 00:57:50 -0000
From: Robert Amesz <sheershion@mailexpire.com>
References: <Xns91519599722E9atreidessovernet@64.154.60.173> <Xns9153F04F88345grahamdrabblelineone@ID-77355.user.dfncis.de> <Xns91545BBA689B0canttouchthis@213.228.0.136> <Xns915413028CE1farkle@24.71.223.45>
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!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
Newsgroups: news.software.readers
Organization: Posted via Supernews, http://www.supernews.com
User-Agent: Xnews/4.11.07 Hamster/1.3.22.104
X-Face: i/!"w>!GV8UL{^20`L2OEvvFz(T"{bFYn2<:u"5<4Blsl-isl(bTDMKVqWL?nk-VY7[[);j =yB|s]|c3nRG4c7^1#+/(D)v4ToNC;PoE=\7baN'i75%+2NhzndU~qJUTI*-v[R"l)Q$GOX3o(-#7C iY6a`%._v`G8cG`!/3,mt?pkyvjv3f}\-mZiNnXJ9EK~D>Qs(ckW8yam<<T!\Kf>`wtj3>eEAAV\
Reply-To: rcamesz@dds.nl
X-Complaints-To: newsabuse@supernews.com
Lines: 31