From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Buchs, Kevin J." Newsgroups: gmane.emacs.help Subject: regex nirvana - near miss Date: Thu, 26 Jun 2014 10:18:24 -0500 Message-ID: <27747b$8snl6c@ironport10.mayo.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1403795949 11265 80.91.229.3 (26 Jun 2014 15:19:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Jun 2014 15:19:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 26 17:19: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 1X0BRy-0007Ls-9U for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Jun 2014 17:18:58 +0200 Original-Received: from localhost ([::1]:45274 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0BRx-0006UF-Mr for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Jun 2014 11:18:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0BRh-0006TQ-P9 for help-gnu-emacs@gnu.org; Thu, 26 Jun 2014 11:18:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0BRa-0003yk-Ve for help-gnu-emacs@gnu.org; Thu, 26 Jun 2014 11:18:41 -0400 Original-Received: from mail10.mayo.edu ([129.176.114.198]:41265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0BRa-0003yT-RX for help-gnu-emacs@gnu.org; Thu, 26 Jun 2014 11:18:34 -0400 Original-Received: from unknown (HELO mail10.mayo.edu) ([10.146.65.138]) by ironport10-dlp.mayo.edu with ESMTP; 26 Jun 2014 10:18:34 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap8EAMg4rFMKgNEM/2dsb2JhbABXA4NfxFuBI3WEQgQBShpUTwgBAYhDvRaFeRuObCgFgm+BPgWEY4VjiQ2IS4Vhhj6Jag Original-Received: from unknown (HELO msgoms03.mayo.edu) ([10.128.209.12]) by ironport10.mayo.edu with ESMTP; 26 Jun 2014 10:18:34 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 129.176.114.198 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:98412 Archived-At: 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. -- Kevin Buchs Research Computer Services Phone: 507-538-5459 Mayo Clinic 200 1st. St SW Rochester, MN 55905 http://mayoclinic.org http://facebook.com/MayoClinic http://youtube.com/MayoClinic http://twitter.com/MayoClinic