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

Henry Spencer henry at utzoo.uucp
Tue Sep 20 14:37:28 AEST 1988


In article <857 at yunexus.UUCP> oz at yunexus.UUCP (Ozan Yigit) writes:
>Any thoughts, and/or some real reason against (foo|) ??

Well, personally, I'd dearly love to be able to use (| and |) as metasymbols,
since (a) one highly desirable extension to my regexp package would be the
beginning/end-of-identifier metasymbols found in many implementations,
(b) I am deeply opposed to declaring more unbackslashed characters to be
metasymbols, and (c) I am even more deeply opposed to declaring *any*
backslashed characters to be metasymbols.  There are other possibilities,
exploiting sequences that are syntax errors at the moment, but none of
them is nearly as pretty.  (Not a trivial issue, given that users have to
remember whatever sequence gets chosen.)  Alas, I am also sympathetic
to the argument that (1) it would be an unfortunate inconsistency, and
(2) programs that generate regexps might have to go out of their way to
avoid generating these magic sequences.  Argh.  Any thoughts?
-- 
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