From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ilya Zakharevich Newsgroups: gmane.emacs.help Subject: Re: regexp and strings you don't want Date: Sat, 30 Aug 2003 14:50:46 +0000 (UTC) Organization: U.C. Berkeley Math. Department. Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <6c185cf3.0308251145.6af55ffc@posting.google.com> <84isogutgt.fsf@slowfox.is.informatik.uni-duisburg.de> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1062255793 13759 80.91.224.253 (30 Aug 2003 15:03:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 30 Aug 2003 15:03:13 +0000 (UTC) Bcc: ilya Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 30 17:03:12 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19t7Fv-0006h7-00 for ; Sat, 30 Aug 2003 17:03:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19t7FS-0006fk-Mk for geh-help-gnu-emacs@m.gmane.org; Sat, 30 Aug 2003 11:02:42 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!agate.berkeley.edu!agate!ilya Original-Newsgroups: gnu.emacs.help,comp.lang.perl.misc Original-Lines: 25 Original-NNTP-Posting-Host: powdermilk.math.berkeley.edu Original-X-Trace: agate.berkeley.edu 1062255046 62122 169.229.140.13 (30 Aug 2003 14:50:46 GMT) Original-X-Complaints-To: usenet@agate.berkeley.edu Original-NNTP-Posting-Date: Sat, 30 Aug 2003 14:50:46 +0000 (UTC) X-How-To-Reach-Me: The From: address is valid X-How-To-Disable-Cc: Put in the headers the line: Mail-Copies-To: never Originator: ilya@powdermilk Original-Xref: shelby.stanford.edu gnu.emacs.help:116280 comp.lang.perl.misc:495385 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:12199 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12199 [A complimentary Cc of this posting was sent to =?iso-8859-1?q?Kai_Gro=DFjohann?= ], who wrote in article <84isogutgt.fsf@slowfox.is.informatik.uni-duisburg.de>: > I guess one meaningful meaning of the hypothetical x\\(!:top\\)y would > be to look whether the characters following x are t-o-p. If so, then > fail. If not, then do like xy would have done. > > That's what Perl does, I believe. Keep in mind that Perl has very primitive REx engine. E.g., "onion rings" (google for me and this) are not supported. The semantic of "onion rings" is that A & B & C &! D & E will match if A can match, and the *substring* which A matched matches B, C, E, and does not match D. The syntax is not defined (until it is supported). [But even with primitive state one can do negation without a problem: (?!.*B) will match anything which does not contain B (if you put this expression up front).]