SPUG:m,n -- why?
Michael R. Wolf
MichaelRunningWolf at att.net
Sat Mar 15 22:05:17 CST 2003
Tim Maher <tim at consultix-inc.com> writes:
> On Sat, Mar 15, 2003 at 12:45:27AM -0800, Shawn Wagner wrote:
> > On Fri, Mar 14, 2003 at 11:24:15PM -0800, Michael R. Wolf wrote:
> > >
> > > Does anyone know the historical roots of "n" and "m" for "min" and
> > > "max" in the regex quantifiers? I can never get a mnemonic for which
> > > is which. (Of course, the min is to the left of the max.) Perhaps if
> > > I know it's roots, I'll remember.
> > >
> >
> > My guesses.
> >
> > >From the ed manpage:
> > ---
> > \{n,m\}
> > \{n,\}
> > \{n\}
>
> You're looking at a Linux re-write of the ed manpage. In my 1982
> Western Electric UNIX User's Manual, and all other Bell Labs
> documentation on the subject, it's shown as \{m,n\}. What's
> the difference? The erroneous rewrite, by ruining the alphabetical
> ordering, suggests mneomonics for the letters that don't apply (see
> my early message on the Fortran connection).
Cut from Apocolypse 5:
{n,m} <n,m> # assert repeat count
{$n,$m} <$n,$m> # indirect repeat counts
Perhaps I opened my eyes for the first time last night. I had always
thought I j
The 1st edition of the camel uses
{n,m}
{n,}
{n}
The 3rd edition of the camel uses
{MIN,MAX}
{MIN,}
{COUNT}
I thought I'd always seen {m,n}, but perhaps that's not true. I guess
I saw what I wanted to see, not what was really there.
Maybe they can me with a mnemonic for spelling mnemonic. Oops, that
won't work... :-)
--
Michael R. Wolf
All mammals learn by playing!
MichaelRunningWolf at att.net
More information about the spug-list
mailing list