what should egrep '|root' print? (syntax/semantics)

Henry Spencer henry at utzoo.uucp
Fri Sep 23 03:43:44 AEST 1988


In article <454 at quintus.UUCP> ok at quintus.UUCP (Richard A. O'Keefe) writes:
>Why not use (* ... ) as the meta-construct?

The trouble is that the word brackets aren't always used together, so the
trailing bracket needs to be distinguishable by itself.  (* is attractive,
but it has no obvious counterpart to be the closing bracket.

>It is *already* the case that programs which generate patterns have to
>go out of their way to avoid far too many magic sequences; a library like
>this would eliminate the problem at the source.

Actually, with my regexp package it suffices to backslash all the ordinary
characters.  A bit crude, but it works.  This is one of the reasons why I
am very reluctant to assign special meaning to any backslashed characters.
-- 
NASA is into artificial        |     Henry Spencer at U of Toronto Zoology
stupidity.  - Jerry Pournelle  | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.unix.wizards mailing list