🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #63785

Re: Should "(was:.+" be stripped? (was: Re: GNKSA and MacSOUP -- point 5b)

#63785
From: Smylers
Date: Tue, 25 Jul 2000 00:00
38 lines
2345 bytes
greg@apple2.com.invalid <greg@apple2.com.invalid> uttered something
along the lines of:

> IMO, the spaces should factor into the matching:  " (was: .+)"

Definitely (otherwise consider what would have happened to the subject
of this very thread!).

Even better, the closing parenthesis should be the last thing on the
line, and match should be non-greedy -- cos in the subject of this
thread we don't want the "was:" just after the "Should" to match with
the closing parenthesis.  I don't know if there's a standard regexp way
of expresing this, but here's two that I've encountered, the first one
is Perl and the second `Vim':

  " \(was: .+?\)$"
  " (was: .\{-1})$"

Having written that, I've just realized that putting in both of those
constraints will break attempts to use it recursively (the inner one
won't match first, cos the final ")" won't be at the end of the line;
the outer one won't match cos the non-greedy-ness will only match the
inner one's "("; so it'll delete from the start of the inner one to the
end of the outer one) so maybe it'd be better only to implement one of
these constraints, not both.

Either way, I think this kind of thing is A Good Thing, however the
orignal regexp as used by MacSoup does not seem to be robust enough to
be sure of not messing with perfectly good subject lines.

Smylers
-- 
Random Rebuttal:  The story of Michael Schumacher and a Rubik's cube
politely washing Jeremy Paxman has been shown to be false.  Apologies
to them.


Technical Details
Message-ID: <slrn8nquis.hrr.csxsdm@cslin-gps.scs>
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!not-for-mail
References: <1ee0m3j.1y89wnt1lmdl4gN%planb@newsreaders.com> <mie7l8.1a.ln@acm.acm> <slrn8neqnn.2ei.ese002@spica.exile.org> <8F78427968675309e9@130.133.1.4> <greg-B4B5F2.08340621072000@news.binary.net>

Show Full Headers
Complete Article Headers
Message-ID: <slrn8nquis.hrr.csxsdm@cslin-gps.scs>
Subject: Re: Should "(was:.+" be stripped? (was: Re: GNKSA and MacSOUP -- point 5b)
Date: Tue, 25 Jul 2000 00:00:00 +0000
From: csxsdm@scs.leeds.ac.uk (Smylers)
References: <1ee0m3j.1y89wnt1lmdl4gN%planb@newsreaders.com> <mie7l8.1a.ln@acm.acm> <slrn8neqnn.2ei.ese002@spica.exile.org> <8F78427968675309e9@130.133.1.4> <greg-B4B5F2.08340621072000@news.binary.net>
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!not-for-mail
X-Deja-AN: 650508878
User-Agent: slrn/0.9.5.6 (UNIX)
Newsgroups: news.software.readers
Originator: csxsdm@linux.leeds.ac.uk
X-Complaints-To: abuse@scs.leeds.ac.uk