From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolai Weibull Newsgroups: gmane.emacs.devel Subject: Re: Patch for lookaround assertion in regexp Date: Tue, 24 Jan 2012 16:09:36 +0100 Message-ID: References: <009001ccd9c0$9bde09f0$d39a1dd0$@cfraizer.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1327417792 21609 80.91.229.12 (24 Jan 2012 15:09:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 24 Jan 2012 15:09:52 +0000 (UTC) Cc: emacs-devel@gnu.org, Colin Fraizer , t.matsuyama.pub@gmail.com To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 24 16:09:47 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rpi0I-0006KR-9B for ged-emacs-devel@m.gmane.org; Tue, 24 Jan 2012 16:09:46 +0100 Original-Received: from localhost ([::1]:47850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rpi0H-00049Z-C8 for ged-emacs-devel@m.gmane.org; Tue, 24 Jan 2012 10:09:45 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rpi0E-00049T-7F for emacs-devel@gnu.org; Tue, 24 Jan 2012 10:09:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rpi09-0006AK-OX for emacs-devel@gnu.org; Tue, 24 Jan 2012 10:09:42 -0500 Original-Received: from mail-pz0-f41.google.com ([209.85.210.41]:60373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rpi09-0006AD-HP for emacs-devel@gnu.org; Tue, 24 Jan 2012 10:09:37 -0500 Original-Received: by dang27 with SMTP id g27so2714532dan.0 for ; Tue, 24 Jan 2012 07:09:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=oOkFWOTZ4iHk6/iK6ct7hP+QNSBi9/ovRK6v3PAV+G4=; b=VourG197bSp/+jcPMawF6wGoxx0LUIN0BNIFtZfXtL0qOLsJtgZ/1sWts9E8GVM9mV W5RW0cXqkJBkjM1MvGOMtHS6UdcBsXefXAsFlg8q7XXVJiPbN4KoVmCGNY7SzalE/+9J kd+esUFbbyARfLJMVkkkaER1lxSWONNlqeS6Y= Original-Received: by 10.68.189.69 with SMTP id gg5mr31260508pbc.41.1327417776631; Tue, 24 Jan 2012 07:09:36 -0800 (PST) Original-Received: by 10.68.136.193 with HTTP; Tue, 24 Jan 2012 07:09:36 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: smHQTM13Hy9nsFR45jL6zm4Ziow X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:147881 Archived-At: On Tue, Jan 24, 2012 at 15:40, Stefan Monnier wr= ote: >> As an alternative to PCRE, which, as has already been pointed out, >> doesn=E2=80=99t match any of these requirements, how about RE2? >> http://code.google.com/p/re2/ >> It=E2=80=99s written in C++, which is a minus, but it should be simple e= nough >> to extend it with \c and \s. > That might work, indeed (tho someone still has to write the > corresponding code). > Note that it does not support lookaround assertions. True, but you can, as far as I know, not do so without (allowing for) exponential behavior. I don=E2=80=99t want to detract from the merits of lookaround assertions (o= r start a discussion on the subject), but I=E2=80=99ve always found them to b= e a sign of improper use of (no longer) regular expressions.