Article View: news.software.readers
Article #230196Re: [slrn][tin] Automatically stripping "(was: )" et al.
From: Peter J Ross
Date: Thu, 12 Feb 2009 20:10
Date: Thu, 12 Feb 2009 20:10
72 lines
3960 bytes
3960 bytes
In news.software.readers on Tue, 10 Feb 2009 16:57:59 +0000 (UTC), Urs Janßen <urs@buil.tin.org> wrote: > 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. Neither of those is portable to slrn, unfortunately. The lack of a powerful regex language is a defect of slrn that I hope will be fixed one day. >>> 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. I've been using "[was:...]" matching for at least a year and I haven't noticed any false positives. I find current practice a better guide than Son-Of-RFC-1036. > 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. Yes. >>> 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 "³" appeared in the post I replied to, where your version has "3". -- PJR :-) slrn newsreader v0.9.9p1: http://slrn.sourceforge.net/ extra slrn documentation: http://slrn-doc.sourceforge.net/ newsgroup name validator: http://pjr.lasnobberia.net/usenet/validator
Technical Details
Message-ID:
<slrngp90ig.nkj.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!border1.nntp.ams.giganews.com!nntp.giganews.com!news.k-dsl.de!news.motzarella.org!motzarella.org!pjr.motzarella.org!not-for-mailReferences:
<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> <gmsbmn$nbi$1@news4.rz.uni-karlsruhe.de>Show Full Headers
Complete Article Headers
Message-ID: <slrngp90ig.nkj.pjr@pjr.gotdns.org> Subject: Re: [slrn][tin] Automatically stripping "(was: )" et al. Date: Thu, 12 Feb 2009 20:10:56 +0000 From: Peter J Ross <pjr@example.invalid> 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> <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.ams.giganews.com!nntp.giganews.com!news.k-dsl.de!news.motzarella.org!motzarella.org!pjr.motzarella.org!not-for-mail Newsgroups: news.software.readers Organization: none Lines: 72 Reply-To: Peter J Ross <peadar.ruadh@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: news.eternal-september.org U2FsdGVkX19ua87QbeH3bw3Hbt++e9WJFNx71VODlMxNowlJNtqL3WeROUWX9vpiqrVkDTOzIgKHq18aZHm17A4Rkwj6NJxUjo4XjgxZLrqYyXE/u30eO6KoL1KGhTqhMw7FyMuQNa0= X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers NNTP-Posting-Date: Thu, 12 Feb 2009 20:18:02 +0000 (UTC) X-Auth-Sender: U2FsdGVkX18zab7GmqPu+jR5ejbfN5eU Cancel-Lock: sha1:VK9buZhc6KwU/5WyC5PRBvH+TrI= User-Agent: slrn/pre1.0.0-2/mm (Linux)