From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michal Nazarewicz Newsgroups: gmane.emacs.bugs Subject: bug#24020: [PATCHv2] Fix =?UTF-8?Q?=E2=80=98[[:word:]]*\u2620=E2=80=99?= failing to match =?UTF-8?Q?=E2=80=98foo\u2620=E2=80=99?= (bug#24020) Date: Wed, 20 Jul 2016 14:36:39 +0200 Organization: http://mina86.com/ Message-ID: References: <83r3ar0z0u.fsf@gnu.org> <1468884601-31164-1-git-send-email-mina86@mina86.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1469018246 4862 80.91.229.3 (20 Jul 2016 12:37:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Jul 2016 12:37:26 +0000 (UTC) Cc: 24020@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 20 14:37:17 2016 Return-path: Envelope-to: geb-bug-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 1bPqkV-0003A8-6A for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Jul 2016 14:37:15 +0200 Original-Received: from localhost ([::1]:34341 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPqkU-0003d1-9T for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Jul 2016 08:37:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPqkO-0003cv-Cl for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 08:37:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPqkI-0008G8-C4 for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 08:37:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45635) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPqkI-0008G4-7g for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 08:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bPqkI-0006uK-0q for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 08:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michal Nazarewicz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Jul 2016 12:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24020 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 24020-submit@debbugs.gnu.org id=B24020.146901820926534 (code B ref 24020); Wed, 20 Jul 2016 12:37:01 +0000 Original-Received: (at 24020) by debbugs.gnu.org; 20 Jul 2016 12:36:49 +0000 Original-Received: from localhost ([127.0.0.1]:57972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPqk4-0006tt-US for submit@debbugs.gnu.org; Wed, 20 Jul 2016 08:36:49 -0400 Original-Received: from mail-wm0-f43.google.com ([74.125.82.43]:38055) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPqk3-0006td-Oy for 24020@debbugs.gnu.org; Wed, 20 Jul 2016 08:36:48 -0400 Original-Received: by mail-wm0-f43.google.com with SMTP id o80so66940503wme.1 for <24020@debbugs.gnu.org>; Wed, 20 Jul 2016 05:36:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:organization:references :user-agent:face:date:message-id:mime-version :content-transfer-encoding; bh=d5skdV6SoztJyZkd+6q1ksFQlKexb8o4zbFyiuIn5Rw=; b=AdRZY9Yd4UbW1Jk9Vab2+wWxNFTgQfy3r1RCvcfKepUbM0VFxO/g8dqKJINuMpSb1P zS9xXXbB4xH4J5pYRlQ90FhlyvyHomqPXjQG50A/qWRE03va48oJ3gVjYAJtAICvsmiD F4f04iYQYLkAlcRHqmgoEp68DZPUJ7fGcWFDn+PWTLO2YE6f3Q3Mr7rmMbGmPKHj4R4U frBg4BL8CrjVGAfpb671VU2Qa1fFhger2kioKwQHsHh4SnYQHr2mSIc0Hm2n940jPBGX LpczCuv5CuHWxLDCfg1WwnlyX3tkzBMlLTzp8umxlb8qXvz6zcDpL7uMWuGayPtYDKOW nxlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to :organization:references:user-agent:face:date:message-id :mime-version:content-transfer-encoding; bh=d5skdV6SoztJyZkd+6q1ksFQlKexb8o4zbFyiuIn5Rw=; b=hzkEt8xR1FH9jRIv+hBUrgGa3xVAP4+VF4UWHiuRd901bbFqCMvBZssdzeT3fojYFV XOgPMZESDMPekkmfRCasEzjFYK9xGKyn2PwglS1psjsH/RvoLhXQbkNKxCz8u5FFMgvz mPuKpFZeCp/LGCDqN0sdFtf30WlRGu+qNdxxFSg60YQtaxuNT3mTrlSe/nvMs6+6FkX0 6zzIkJk/ycO1i7qs6g6/2CuV+ivXp3URUAM47TIBWCJ9ayRSl6OZ+//OO0WZUKtFZyxV EBNB1R+BowrpaDmKpl5ZbEmLx5R02JaxRzMul7+vvggNHvx9S85gE3tppkgWU9aLxs40 d0KQ== X-Gm-Message-State: ALyK8tKkFpS11CHhQNIfy+sJuqnMCn8HtjRtwPrIF42DcQfsU1aYQUoYcKAC6MvaAQQbdIho X-Received: by 10.194.69.198 with SMTP id g6mr1258821wju.136.1469018201591; Wed, 20 Jul 2016 05:36:41 -0700 (PDT) Original-Received: from mpn-glaptop ([172.28.88.8]) by smtp.gmail.com with ESMTPSA id a194sm26072007wmd.24.2016.07.20.05.36.40 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 20 Jul 2016 05:36:40 -0700 (PDT) In-Reply-To: User-Agent: Notmuch/0.19+53~g2e63a09 (http://notmuchmail.org) Emacs/25.1.50.1 (x86_64-unknown-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWbfGlUPDDHgE57V0jUupKjgIObY0PLrom9mH4dFRK4gmjPs41MxjOgAAACP0lEQVQ4T23Sv2vbQBQHcBk1xE6WyALX107VUEgmn6+ouUwpEQQ6uRjttkWP4CkBg2M0BQLBdPFZYPsyFYo7qEtKDQ7on+t7+nF2Ux8ahD587717OmNYrOvycHsZ+o2r051wHTHysAvGb8ygvgu4QWT0sCmkgZCIEnlV2X8BtyraazFGDuxhmKSQJMlwHQ7v5MHSNxmz78rfElwAa3ieVD9e+hBhjaPDDG6NgFo2f4wBMNIo5YmRtF0RyDgFjJjlMIWbnuM4x9MMfABGTlN4qgIQB4A1DEyA1BHWtfeWNUMwiVJKoqh97KrkOO+qzgluVYLvFCUKAX73nONeBr7BGMdM6Sg0kuep03VywLaIzRiVr+GAzKlpQIsAFnWAG2e6DT5WmWDiudZMIc6hYrMOmeMQK9WX0B+/RfjzL9DI7Y9/Iayn29Ci0r2i4f9gMimMSZLCDMalgQGU5hnUtqAN0OGvEmO1Wnl0C0wWSCEHnuHBqmygxdxA8oWXwbipoc1EoNR9DqOpBpOJrnr0criQab9ZT4LL+wI+K7GBQH30CrhUruilgP9DRTrhVWZCiAyILP+wiuLeCKGTD6r/nc8LOJcAwR6IBTUs+7CASw3QFZ0MdA2PI3zNziH4ZKVhXCRMBjeZ1DWMekKwDCASwExy+NQ86TaykaDAFHO4aP48y4 fIcDM5yOG8GcTLbOyp8A8azjJI93JFd1EA6yN8sSxMQJWoABqniRZVykYgRXErzrdqExAoUrRb0xfRp8p2A/4XmfilTtkDZ4cAAAAASUVORK5CYII= X-Face: -TR8(rDTHy/(xl?SfWd1|3:TTgDIatE^t'vop%*gVg[kn$t{EpK(P"VQ=~T2#ysNmJKN$"yTRLB4YQs$4{[.]Fc1)*O]3+XO^oXM>Q#b^ix, O)Zbn)q[y06$`e3?C)`CwR9y5riE=fv^X@x$y?D:XO6L&x4f-}}I4=VRNwiA^t1-ZrVK^07.Pi/57c_du'& X-PGP: 50751FF4 X-PGP-FP: AC1F 5F5C D418 88F8 CC84 5858 2060 4012 5075 1FF4 X-Hashcash: 1:20:160720:schwab@suse.de::Qn9lZtsO4q6voyC6:0003Ky6 X-Hashcash: 1:20:160720:24020@debbugs.gnu.org::Y7rCbDhIKy/dUg/h:00000000000000000000000000000000000000004Q7m X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:121295 Archived-At: > Michal Nazarewicz writes: >> For example, take regular expression =E2=80=98[[:alpha:]]*1=E2=80=99 try= ing to match >> a string =E2=80=98foo=E2=80=99. Since the Kleene star is greedy, the en= gine will test >> the shortest match for =E2=80=98[[:alpha:]]*=E2=80=99 which is =E2=80=98= foo=E2=80=99. At this point On Tue, Jul 19 2016, Andreas Schwab wrote: > Did you mean "the longest match"? Yep, thanks for spotting this. --=20 Best regards =E3=83=9F=E3=83=8F=E3=82=A6 =E2=80=9C=F0=9D=93=B6=F0=9D=93=B2=F0=9D=93=B7= =F0=9D=93=AA86=E2=80=9D =E3=83=8A=E3=82=B6=E3=83=AC=E3=83=B4=E3=82=A4=E3=83= =84 =C2=ABIf at first you don=E2=80=99t succeed, give up skydiving=C2=BB