Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!ncar!gatech!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!a.cs.uiuc.edu!m.cs.uiuc.edu!liberte From: liberte@m.cs.uiuc.edu Newsgroups: comp.editors Subject: Re: pattern matches Message-ID: <37200009@m.cs.uiuc.edu> Date: 2 Jul 88 16:20:00 GMT References: <427@grand.UUCP> Lines: 23 Nf-ID: #R:grand.UUCP:427:m.cs.uiuc.edu:37200009:000:813 Nf-From: m.cs.uiuc.edu!liberte Jul 2 11:20:00 1988 I would like to have a more powerful negation operator. Currently, regexps allow negation of a signal set of chars. I would like negation of a whole subexpression. e.g. abc(def)^ would match a string that starts with abc but is NOT followed by def. I think "^" would be unambiguous as a postfix operator. "^" as beginning-of-line would only be valid as the first char of a subexpression. There is possible confusion with [^abc] as negation of a char set, but such use could be phased out since [abc]^ is equivalent. Since negation of a regular expression is a regular expression and all you have to do to a finite state machine is flip accepting and non-accepting states, this should be trivial. Why wasnt it done before? Dan LaLiberte uiucdcs!liberte liberte@cs.uiuc.edu liberte%a.cs.uiuc.edu@uiucvmd.bitnet