From unknown Wed Jun 25 09:13:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20655: According to docs non-greedy regexp should work in guile but they don't Resent-From: Michael Gerdau Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 25 May 2015 22:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20655 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 20655@debbugs.gnu.org X-Debbugs-Original-To: bug-guile@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.143259376828507 (code B ref -1); Mon, 25 May 2015 22:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 May 2015 22:42:48 +0000 Received: from localhost ([127.0.0.1]:55944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yx155-0007Ph-2Q for submit@debbugs.gnu.org; Mon, 25 May 2015 18:42:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42182) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yx0QQ-0006QV-KF for submit@debbugs.gnu.org; Mon, 25 May 2015 18:00:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yx0QK-000599-5k for submit@debbugs.gnu.org; Mon, 25 May 2015 18:00:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx0QK-000595-2y for submit@debbugs.gnu.org; Mon, 25 May 2015 18:00:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx0QI-0004EB-Vb for bug-guile@gnu.org; Mon, 25 May 2015 18:00:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yx0QE-00058d-UV for bug-guile@gnu.org; Mon, 25 May 2015 18:00:38 -0400 Received: from wp020.webpack.hosteurope.de ([80.237.132.27]:53723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx0QE-00058U-O5 for bug-guile@gnu.org; Mon, 25 May 2015 18:00:34 -0400 Received: from ip1f10328e.dynamic.kabel-deutschland.de ([31.16.50.142] helo=hamiller.localnet); authenticated by wp020.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) id 1Yx0QC-0003Hl-6Y; Tue, 26 May 2015 00:00:32 +0200 From: Michael Gerdau Date: Mon, 25 May 2015 23:58:53 +0200 Message-ID: <3731893.AiLGfpWM9Y@hamiller> User-Agent: KMail/4.14.8 (Linux/4.0.4-1-ARCH; KDE/4.14.8; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1908765.2lBZmosfYh"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-bounce-key: webpack.hosteurope.de;mgd@qata.de;1432591234;fa0c8864; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Mailman-Approved-At: Mon, 25 May 2015 18:42:45 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --nextPart1908765.2lBZmosfYh Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Hi list, the guile documentation under https://www.gnu.org/software/guile/manual/html_node/Regular-Expressions= .html#index-regular-expressions directly references Regular expressions used in Emacs which do support non-greedy regexp. However in the archive of the guile-devel ML I found a thread that seem= s to indicate that guile simply does not support non-greedy regexp, which= is perfectly in line with my findings (see below). The thread I'm referring to is found under https://www.mail-archive.com/guile-devel%40gnu.org/msg12022.html Testcase: If non-greedy regexp do work the following two statements should provid= e the exakt same strings: (match:substring (string-match "_(.*?)_" "a_=E4_=F6_de_f=FC_") 1) (match:substring (string-match "_([^_]*)_" "a_=E4_=F6_de_f=FC_") 1) However for me they don't. Here is a log how I tested it: $ guile GNU Guile 2.0.11 Copyright (C) 1995-2014 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> (match:substring (string-match "_(.*?)_" "a_=E4_=F6_de_f=FC_") 1) $1 =3D "=E4_=F6_de_f=FC" scheme@(guile-user)> (match:substring (string-match "_([^_]*)_" "a_=E4_=F6_de_f=FC_") 1) $2 =3D "=E4" scheme@(guile-user)> ,q For the record: I check the same regexp in Perl where they provide the same result. AFAICT this is either misleading if not an outright documentation bug, or a missing feature in guile. Kind regards, Michael =2D-=20 Michael Gerdau email: mgd@qata.de GPG-keys available on request or at public keyserver --nextPart1908765.2lBZmosfYh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJVY5sdAAoJEPewMcuDSBb5VBkH/15dZSk/O16l5ccrXg1Lkbgd b0QRjij66ha99qoAC1GZejBsStr02ojopUdjL623rVWIa+u9dq9/WYWk0/B3pUpv /AqjBSMaHL9wmzp1o/zuWAUiUFdyE7JTKvVYbxlRk+5orzVrlEAbXkIIAo0AQ1Wb TcrZjtBpedfXcdFMUa55su5D2ytcmUaiSrzydp0Ssd9iJVBw65cFVy8C19dZ3gjd Dr9qFtDzVRIrTsXnsp5zbRlKdLDKhBuPnjz+1USi6WVCXhUcosfLmy9XzeykDPhZ AY5ugKKFNFE3yJjyGXRjSpQQQ1BPwl9a/ALJRg/phT7ZIcCO6FiyuJHEOwatahI= =PIoa -----END PGP SIGNATURE----- --nextPart1908765.2lBZmosfYh-- From unknown Wed Jun 25 09:13:12 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Michael Gerdau Subject: bug#20655: closed (Re: bug#20655: According to docs non-greedy regexp should work in guile but they don't) Message-ID: References: <8760szljsk.fsf@pobox.com> <3731893.AiLGfpWM9Y@hamiller> X-Gnu-PR-Message: they-closed 20655 X-Gnu-PR-Package: guile Reply-To: 20655@debbugs.gnu.org Date: Thu, 23 Jun 2016 20:42:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1466714522-23934-1" This is a multi-part message in MIME format... ------------=_1466714522-23934-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #20655: According to docs non-greedy regexp should work in guile but they d= on't which was filed against the guile package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 20655@debbugs.gnu.org. --=20 20655: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D20655 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1466714522-23934-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 20655-done) by debbugs.gnu.org; 23 Jun 2016 20:41:58 +0000 Received: from localhost ([127.0.0.1]:53047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGBRm-0006Dl-CE for submit@debbugs.gnu.org; Thu, 23 Jun 2016 16:41:58 -0400 Received: from pb-sasl2.pobox.com ([64.147.108.67]:65091 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGBRl-0006De-1u for 20655-done@debbugs.gnu.org; Thu, 23 Jun 2016 16:41:57 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id BD638249C8; Thu, 23 Jun 2016 16:41:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=1kONpy1X1NUBY530AhW9H01wUlM=; b=jHxdgh gh4XcsHMqtSZJxINfDb6pZAAben5LhPebDBKRemXcKeOslK8serpf3wcmh2g5N5i j6W/dLphoCWn/QTlE3iLKKpSDHuiwtO2a/33n5RmTh/6193dJdRI8yQOnd0/Q09u Vn/Dg27oYMt3BbYDK8MOevpVIsdDkXnl8WZYU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=Eaea47KDN2FUTtCqdBuYetSauC4n/4ed ZzIYX1Z0NCQ5SVoNNU5xvnyF6V9yJDx46pCAxNF3g8VR3cUhA9SwAd+wyxWCgpSL ovojGULqj+T+7vXqNqY1tyVYtvDXL+Yz/xDLcBW0dpsbXe4IH3gmNt5puq/UHV0O 8XFuyXKnrXQ= Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id B6176249C6; Thu, 23 Jun 2016 16:41:55 -0400 (EDT) Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl2.pobox.com (Postfix) with ESMTPSA id DC3DB249C5; Thu, 23 Jun 2016 16:41:54 -0400 (EDT) From: Andy Wingo To: Michael Gerdau Subject: Re: bug#20655: According to docs non-greedy regexp should work in guile but they don't References: <3731893.AiLGfpWM9Y@hamiller> Date: Thu, 23 Jun 2016 22:41:47 +0200 In-Reply-To: <3731893.AiLGfpWM9Y@hamiller> (Michael Gerdau's message of "Mon, 25 May 2015 23:58:53 +0200") Message-ID: <8760szljsk.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: EC2EA424-3982-11E6-BDC1-28A6F1301B6D-02397024!pb-sasl2.pobox.com X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 20655-done Cc: 20655-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) On Mon 25 May 2015 23:58, Michael Gerdau writes: > the guile documentation under > https://www.gnu.org/software/guile/manual/html_node/Regular-Expressions.html#index-regular-expressions > directly references Regular expressions used in Emacs which do > support non-greedy regexp. > > However in the archive of the guile-devel ML I found a thread that seems > to indicate that guile simply does not support non-greedy regexp, which > is perfectly in line with my findings (see below). > > AFAICT this is either misleading if not an outright documentation bug, > or a missing feature in guile. A documentation bug indeed. Fixed in git by Diogo Ramos. Thanks for the report, Andy ------------=_1466714522-23934-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 25 May 2015 22:42:48 +0000 Received: from localhost ([127.0.0.1]:55944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yx155-0007Ph-2Q for submit@debbugs.gnu.org; Mon, 25 May 2015 18:42:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42182) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yx0QQ-0006QV-KF for submit@debbugs.gnu.org; Mon, 25 May 2015 18:00:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yx0QK-000599-5k for submit@debbugs.gnu.org; Mon, 25 May 2015 18:00:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx0QK-000595-2y for submit@debbugs.gnu.org; Mon, 25 May 2015 18:00:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx0QI-0004EB-Vb for bug-guile@gnu.org; Mon, 25 May 2015 18:00:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yx0QE-00058d-UV for bug-guile@gnu.org; Mon, 25 May 2015 18:00:38 -0400 Received: from wp020.webpack.hosteurope.de ([80.237.132.27]:53723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx0QE-00058U-O5 for bug-guile@gnu.org; Mon, 25 May 2015 18:00:34 -0400 Received: from ip1f10328e.dynamic.kabel-deutschland.de ([31.16.50.142] helo=hamiller.localnet); authenticated by wp020.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) id 1Yx0QC-0003Hl-6Y; Tue, 26 May 2015 00:00:32 +0200 From: Michael Gerdau To: bug-guile@gnu.org Subject: According to docs non-greedy regexp should work in guile but they don't Date: Mon, 25 May 2015 23:58:53 +0200 Message-ID: <3731893.AiLGfpWM9Y@hamiller> User-Agent: KMail/4.14.8 (Linux/4.0.4-1-ARCH; KDE/4.14.8; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1908765.2lBZmosfYh"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-bounce-key: webpack.hosteurope.de;mgd@qata.de;1432591234;fa0c8864; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 25 May 2015 18:42:45 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --nextPart1908765.2lBZmosfYh Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Hi list, the guile documentation under https://www.gnu.org/software/guile/manual/html_node/Regular-Expressions= .html#index-regular-expressions directly references Regular expressions used in Emacs which do support non-greedy regexp. However in the archive of the guile-devel ML I found a thread that seem= s to indicate that guile simply does not support non-greedy regexp, which= is perfectly in line with my findings (see below). The thread I'm referring to is found under https://www.mail-archive.com/guile-devel%40gnu.org/msg12022.html Testcase: If non-greedy regexp do work the following two statements should provid= e the exakt same strings: (match:substring (string-match "_(.*?)_" "a_=E4_=F6_de_f=FC_") 1) (match:substring (string-match "_([^_]*)_" "a_=E4_=F6_de_f=FC_") 1) However for me they don't. Here is a log how I tested it: $ guile GNU Guile 2.0.11 Copyright (C) 1995-2014 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> (match:substring (string-match "_(.*?)_" "a_=E4_=F6_de_f=FC_") 1) $1 =3D "=E4_=F6_de_f=FC" scheme@(guile-user)> (match:substring (string-match "_([^_]*)_" "a_=E4_=F6_de_f=FC_") 1) $2 =3D "=E4" scheme@(guile-user)> ,q For the record: I check the same regexp in Perl where they provide the same result. AFAICT this is either misleading if not an outright documentation bug, or a missing feature in guile. Kind regards, Michael =2D-=20 Michael Gerdau email: mgd@qata.de GPG-keys available on request or at public keyserver --nextPart1908765.2lBZmosfYh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJVY5sdAAoJEPewMcuDSBb5VBkH/15dZSk/O16l5ccrXg1Lkbgd b0QRjij66ha99qoAC1GZejBsStr02ojopUdjL623rVWIa+u9dq9/WYWk0/B3pUpv /AqjBSMaHL9wmzp1o/zuWAUiUFdyE7JTKvVYbxlRk+5orzVrlEAbXkIIAo0AQ1Wb TcrZjtBpedfXcdFMUa55su5D2ytcmUaiSrzydp0Ssd9iJVBw65cFVy8C19dZ3gjd Dr9qFtDzVRIrTsXnsp5zbRlKdLDKhBuPnjz+1USi6WVCXhUcosfLmy9XzeykDPhZ AY5ugKKFNFE3yJjyGXRjSpQQQ1BPwl9a/ALJRg/phT7ZIcCO6FiyuJHEOwatahI= =PIoa -----END PGP SIGNATURE----- --nextPart1908765.2lBZmosfYh-- ------------=_1466714522-23934-1--