SPUG:m,n -- why?
Tim Maher
tim at consultix-inc.com
Sat Mar 15 12:25:11 CST 2003
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).
> number. It makes sense to use it here. Then, 'at most m times'. Thus, think
> most, think m.
>
> Or it could just be that m is right to the right of n on a qwerty
> keyboard...
>
> --
> Shawn Wagner
> shawnw at speakeasy.org
> _____________________________________________________________
> Seattle Perl Users Group Mailing List
> POST TO: spug-list at mail.pm.org
> ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list
> MEETINGS: 3rd Tuesdays, U-District, Seattle WA
> WEB PAGE: www.seattleperl.org
--
*==============================================================================*
| Dr. Tim Maher, CEO, Consultix (206) 781-UNIX/8649; ask for FAX# |
| tim at consultix-inc.com www.consultix-inc.com www.softwareprofessor.com |
*==============================================================================*
More information about the spug-list
mailing list