Article View: news.software.readers
Article #14140Re: rn/trn: Help! Where are the regexps documented?
From: Jeremy Mathers
Date: Thu, 29 Dec 1994 22:26
Date: Thu, 29 Dec 1994 22:26
56 lines
3228 bytes
3228 bytes
In article <3dtr0h$h2h@newstand.syr.edu>,
Peter Kappesser <pjkappes@mailbox.syr.edu> wrote:
..
>the phrase "such as those used by ed(1)" -- I infer this means only similar
>to, and not a rigorous implementation. For one thing, the regexps in trn are
>case insensitive, and anchoring doesn't seem to work. The section in the man
>page apparently indicates that the special constructs listed there are the
>only ones usable.
Yes. This is a pretty ugly situation. I wonder why they don't just do
full blown regular expressions. (Clearly, they do not...)
The real point is that I'd just like to be able to get the straight poop
on it.
>Well, let's go at it from a different direction: What are you trying to
>select or kill? Maybe you can get at it on a different header line, or work
>something tricky with a shell-escape command. If you're selectively saving
>stuff, I've had success by piping articles to scripts I've written; the
>scripts examine the articles more fully, and decide whether to save or
>ignore them.
Well, obviously, my example is contrived to illustrate the point.
Here's what I'm really trying to do. In certain newsgroups, the only
articles worth reading are the long ones. You want to kill all the
articles that are less than a certain length. The following code works
fine for me:
/\ .$/Hlines::=j
/\ ..$/Hlines::=j
What this does is kills any article that contains a Lines: header with
less than 3 characters after it. (Which results in all articles less
than 100 lines being discarded.)
As I say, it works just fine, but it seems ugly. I'd like to recode it as:
/\ .\{1,\2}$/Hlines::=j
Just an ego thing; you know how it is...
************************************************************************
"We trained hard -- but it seemed that every time we were
beginning to form into teams, we would be reorganized. I
was to learn later in life that we tend to meet any new
situation by reorganizing. And what a wonderful method it
can be for creating the illusion of progress while producing
confusion, inefficiency, and demoralization."
-- Gaius Petronius Arbiter --
(First Century)
- pynq@quads.uchicago.edu, who is still costing the net
hundreds, if not thousands, of dollars, every time he posts -
************************************************************************
rwvpf wpnrrj ibf ijrfer
Technical Details
Message-ID:
<1994Dec29.222627.21856@midway.uchicago.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!nntp.gmd.de!Germany.EU.net!EU.net!howland.reston.ans.net!gatech!ncar!uchinews!ellis!pynqReferences:
<1994Dec27.193413.4710@midway.uchicago.edu> <3dtr0h$h2h@newstand.syr.edu>Show Full Headers
Complete Article Headers
Message-ID: <1994Dec29.222627.21856@midway.uchicago.edu> Subject: Re: rn/trn: Help! Where are the regexps documented? Date: Thu, 29 Dec 1994 22:26:27 GMT From: pynq@ellis.uchicago.edu (Jeremy Mathers) References: <1994Dec27.193413.4710@midway.uchicago.edu> <3dtr0h$h2h@newstand.syr.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!nntp.gmd.de!Germany.EU.net!EU.net!howland.reston.ans.net!gatech!ncar!uchinews!ellis!pynq Newsgroups: news.software.readers Sender: news@uchinews.uchicago.edu (News System) Reply-To: pynq@midway.uchicago.edu Organization: D. J. Dougherty & Associates Lines: 56