From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: regex nirvana - near miss Date: Thu, 26 Jun 2014 22:36:33 +0700 Message-ID: References: <27747b$8snl6c@ironport10.mayo.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1403797027 25665 80.91.229.3 (26 Jun 2014 15:37:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Jun 2014 15:37:07 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: "Buchs, Kevin J." Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 26 17:37:01 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X0BjO-0004Tx-2w for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Jun 2014 17:36:58 +0200 Original-Received: from localhost ([::1]:45478 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0BjN-0008Vi-Nj for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Jun 2014 11:36:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0Bj5-0008LR-GX for help-gnu-emacs@gnu.org; Thu, 26 Jun 2014 11:36:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0Biz-0002i8-P6 for help-gnu-emacs@gnu.org; Thu, 26 Jun 2014 11:36:39 -0400 Original-Received: from mail-qg0-x22c.google.com ([2607:f8b0:400d:c04::22c]:37687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0Biz-0002hy-M2 for help-gnu-emacs@gnu.org; Thu, 26 Jun 2014 11:36:33 -0400 Original-Received: by mail-qg0-f44.google.com with SMTP id j107so3230138qga.31 for ; Thu, 26 Jun 2014 08:36:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=ty7zFO/4QZ6m7BkAjal7EQTzLLdAW9nfVvWROW26Qbo=; b=Sj9OWjTwrDfcBh4NfIVhokMJYvWkQkNfU8QkqqStA+L9rhAcLvZ3D61diGtCjriJbY tgSadCUGFTUUdbs5fd2HisY870FE++OXrngtg0YhQ4UeIMSGiF7SksMBuuoU2kFbPUzQ aKVUmTBrklMM4dIFWvRO+JckRdy2mTM1QoWbbX2FXYWp9b0DlI/dFaXz3odziaSM23ha RrEraXi3VdrB91CVJQ7r2XDbYkMCS6BaUjkNhYb6ZEOVXSP+TtMK/s74RADFHbSYzipZ oScsjtkEzNmsNkShJqyCAEFoi1h9hZUY9aAHE6Ng9Zw8dAI7ObQlsxiF5qT+21zgx6jG cEmQ== X-Received: by 10.140.85.166 with SMTP id n35mr21688185qgd.67.1403796993106; Thu, 26 Jun 2014 08:36:33 -0700 (PDT) Original-Received: by 10.96.154.73 with HTTP; Thu, 26 Jun 2014 08:36:33 -0700 (PDT) In-Reply-To: <27747b$8snl6c@ironport10.mayo.edu> X-Google-Sender-Auth: QCDf2h43QAZAl4cTwWWUjbtR574 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c04::22c X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:98415 Archived-At: On Thu, Jun 26, 2014 at 10:18 PM, Buchs, Kevin J. wrote: > Often I wish to match a string not followed by another string, e.g. "abc" > without "def" following. I had a glimpse of nirvana today when I thought of > trying this RE: abc\(def\)\{0\}, but alas it was not to be had as it gets > optimized and just matches "abc". It is tedious to use: > abc\([^d]\|d[^e]\|de[^f]\), especially when the second string gets longer. What you are looking for is called a negative lookahead assertion, and no, Emacs currently does not support them.