Article View: news.software.readers
Article #14116Re: rn/trn: Help! Where are the regexps documented?
From: Peter Kappesser
Date: Thu, 29 Dec 1994 08:12
Date: Thu, 29 Dec 1994 08:12
29 lines
2382 bytes
2382 bytes
Recently in news.software.readers, pynq@midway.uchicago.edu wrote:
>Exists there complete documentation for the reg exp parser used in trn (3.5) ?
>
>Given that no two implementations of reg exps are the same (and it seems
>that rarely is one ever a subset of another...), it does not do for the
>trn man page to say, "like in ed(1) except for..."
I can't help you on the documentation, except to note that the man page uses
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.
>In particular, I could not get the [re]\{n,m\} syntax to work, yet man ed
>clearly lists this as a legal construct. I.e., doing: /.\{1,5\}
>ought to pick up all threads whose subject contain a string of length 1
>through 5 - that is, all threads (except possibly nullnamed ones). Yet
>it consistently gets nothing.
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.
--
pjkappes@mailbox.syr.edu (Peter Kappesser)
Technical Details
Message-ID:
<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!newsserver.jvnc.net!news.cac.psu.edu!news.pop.psu.edu!psuvax1!uwm.edu!spool.mu.edu!bloom-beacon.mit.edu!news.kei.com!ub!galileo.cc.rochester.edu!newstand.syr.edu!forbin.syr.edu!pjkappesReferences:
<1994Dec27.193413.4710@midway.uchicago.edu>Show Full Headers
Complete Article Headers
Message-ID: <3dtr0h$h2h@newstand.syr.edu> Subject: Re: rn/trn: Help! Where are the regexps documented? Date: Thu, 29 Dec 1994 08:12:01 +0000 From: pjkappes@forbin.syr.edu (Peter Kappesser) References: <1994Dec27.193413.4710@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!newsserver.jvnc.net!news.cac.psu.edu!news.pop.psu.edu!psuvax1!uwm.edu!spool.mu.edu!bloom-beacon.mit.edu!news.kei.com!ub!galileo.cc.rochester.edu!newstand.syr.edu!forbin.syr.edu!pjkappes Newsgroups: news.software.readers Organization: Not Quite Syracuse University, Syracuse, NY Lines: 29 Reply-To: pjkappes@mailbox.syr.edu NNTP-Posting-Host: forbin.syr.edu