Article View: news.software.readers
Article #14267Re: rn/trn: Help! Where are the regexps documented?
From: Wayne Davison
Date: Wed, 04 Jan 1995 02:01
Date: Wed, 04 Jan 1995 02:01
21 lines
1497 bytes
1497 bytes
According to Jeremy Mathers <pynq@midway.uchicago.edu>:
> Exists there complete documentation for the reg exp parser used in
> trn (3.5) ?
No, I guess Larry Wall figured this would be a neat puzzle for the
user to have fun with, and I haven't ever gotten the urge to write
up a doc on it.
> In particular, I could not get the [re]\{n,m\} syntax to work
As you've discovered, this doesn't work. One thing you might try
is something like: /^.$\|^..$\|^...$\|^....$\|^.....$/ to match
any string from 1 to 5 bytes long (the \| operator allows multiple
regexps to be compiled, but (unfortunately) doesn't support being
used inside of a \(\) expression).
If someone knows of a good regex package that I can distribute with
trn, let me know.
--
Wayne Davison
davison@borland.com
Technical Details
Message-ID:
<D1uyzA.2zo@borland.com>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!nntpserver.pppl.gov!princeton!udel!news.mathworks.com!hookup!usc!elroy.jpl.nasa.gov!decwrl!borland.com!davisonReferences:
<1994Dec27.193413.4710@midway.uchicago.edu>Show Full Headers
Complete Article Headers
Message-ID: <D1uyzA.2zo@borland.com> Subject: Re: rn/trn: Help! Where are the regexps documented? Date: Wed, 4 Jan 1995 02:01:57 GMT From: davison@borland.com (Wayne Davison) 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!nntpserver.pppl.gov!princeton!udel!news.mathworks.com!hookup!usc!elroy.jpl.nasa.gov!decwrl!borland.com!davison Newsgroups: news.software.readers Organization: Borland International Lines: 21