🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #230014

Re: [slrn][tin] Automatically stripping "(was: )" et al.

#230014
From: Urs Janßen
Date: Tue, 10 Feb 2009 16:57
50 lines
3077 bytes
Frank Slootweg wrote:
> Peter J Ross <pjr@example.invalid> wrote:
>> > strip_was_regex=.\(([Ww]a[rs]|[Bb]y[l³]o):.*\)\s*$
>>         strip_was_regexp " ?[([][wW]as:.*[])]$"
>> Your method causes problems with
>>         foo(was: bar)
>> which becomes
>>         fo

this can be solved (but the common form is to use " (was:" including
a space at the beginning) via:

	(?<=.)\((?:[Ww]a[rs]|[Bb]y[l\xb3]o):.*\)\s*$

or (the \K stuff might be less protable)

	.\K\((?:[Ww]a[rs]|[Bb]y[l\xb3]o):.*\)\s*$

or by turning the leading . into \s (but the it won't match

		foo(was: bar)

anymore. I'd go for the first solution.

>> and also with
>>         foo [was: bar]
>> which isn't trimmed at all.

that's intended as it doesn't match the suggest way (in Spencers son
of 1036) of a subject change and might cause too much false positives.

if one really need to catch the [was: case] as well this can be done
via:

	(?<=.)\[\[(](?:[Ww]a[rs]|[Bb]y\xb3]o):.*\[)\]]\s*$

which will catch

	foo(was: bar]

and the like, or via

	(?<=.)(?:\((?:[Ww]a[rs]|[Bb]y\xb3]o):.*\)|\[(?:[Ww]a[rs]|[Bb]y\xb3]o):.*\])\s*$

which will not catch (] or [) combinations.

>> My method doesn't catch "war" or that pseudo-Cyrillic(?) stuff. That's
>> why the two methods need to be combined.

the pseudo-Cyrillic stuff is polish
Technical Details
Message-ID: <gmsbmn$nbi$1@news4.rz.uni-karlsruhe.de>
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!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!inka.de!peernews!news.rz.uni-karlsruhe.de!not-for-mail
References: <pan.2009.01.05.14.38.21@shared-secrets.com> <slrngo9mn0.681.pjr@pjr.motzarella.org> <Jeff_Relf@Seattle.2009_Jan.31|9.29pm|q> <slrngobmau.aki.pjr@pjr.motzarella.org> <slrngoboud.9hm.steve@news.mixmin.net> <Jeff_Relf@Seattle.2009_Feb.1|1.21pm|s> <g0Sil.279$v8.233@bignews5.bellsouth.net> <1iuppq5.5qm0lr1lws1cbN%snipe@spambin.fsnet.co.uk> <slrn20090206081302.426.twooffive@may.eternal-september.org> <fb43$498c46ad$5ed00124$16396@cache5.tilbu1.nb.home.nl> <slrngp1k1i.9d9.pjr@pjr.gotdns.org> <3193c$499186b6$5ed00124$23414@cache6.tilbu1.nb.home.nl>

Show Full Headers
Complete Article Headers
Message-ID: <gmsbmn$nbi$1@news4.rz.uni-karlsruhe.de>
Subject: Re: [slrn][tin] Automatically stripping "(was: )" et al.
Date: Tue, 10 Feb 2009 16:57:59 +0000
From: Urs Janßen <urs@buil.tin.org>
References: <pan.2009.01.05.14.38.21@shared-secrets.com> <slrngo9mn0.681.pjr@pjr.motzarella.org> <Jeff_Relf@Seattle.2009_Jan.31|9.29pm|q> <slrngobmau.aki.pjr@pjr.motzarella.org> <slrngoboud.9hm.steve@news.mixmin.net> <Jeff_Relf@Seattle.2009_Feb.1|1.21pm|s> <g0Sil.279$v8.233@bignews5.bellsouth.net> <1iuppq5.5qm0lr1lws1cbN%snipe@spambin.fsnet.co.uk> <slrn20090206081302.426.twooffive@may.eternal-september.org> <fb43$498c46ad$5ed00124$16396@cache5.tilbu1.nb.home.nl> <slrngp1k1i.9d9.pjr@pjr.gotdns.org> <3193c$499186b6$5ed00124$23414@cache6.tilbu1.nb.home.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.20140922.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!inka.de!peernews!news.rz.uni-karlsruhe.de!not-for-mail
Newsgroups: news.software.readers
Organization: tin.org
Lines: 50
NNTP-Posting-Host: akkuser-dmz.akk.uni-karlsruhe.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news4.rz.uni-karlsruhe.de 1234285079 23922 172.22.9.237 (10 Feb 2009
X-Complaints-To: abuse@uni-karlsruhe.de
NNTP-Posting-Date: Tue, 10 Feb 2009 16:57:59 +0000 (UTC)
Cancel-Lock: sha1:VwGEcTJhoyTvSRpZOh29OAS2eDE=
X-No-Archive: yes
X-No-HTML: yes
User-Agent: tin/1.9.4-20090201 ("Dalintober") (UNIX) (Linux/2.6.24-22-generic
 (x86_64))