From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Gerdau Newsgroups: gmane.lisp.guile.bugs Subject: bug#20655: 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1908765.2lBZmosfYh"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1432593803 20948 80.91.229.3 (25 May 2015 22:43:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 May 2015 22:43:23 +0000 (UTC) To: 20655@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue May 26 00:43:11 2015 Return-path: Envelope-to: guile-bugs@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 1Yx15T-0008Ti-Ed for guile-bugs@m.gmane.org; Tue, 26 May 2015 00:43:11 +0200 Original-Received: from localhost ([::1]:45194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx15S-0000ts-M2 for guile-bugs@m.gmane.org; Mon, 25 May 2015 18:43:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx15P-0000th-7o for bug-guile@gnu.org; Mon, 25 May 2015 18:43:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yx15L-00074w-61 for bug-guile@gnu.org; Mon, 25 May 2015 18:43:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx15L-00074s-2Z for bug-guile@gnu.org; Mon, 25 May 2015 18:43:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Yx15K-0007QU-OQ for bug-guile@gnu.org; Mon, 25 May 2015 18:43:02 -0400 X-Loop: help-debbugs@gnu.org 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: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.143259376828507 (code B ref -1); Mon, 25 May 2015 22:43:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 May 2015 22:42:48 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 User-Agent: KMail/4.14.8 (Linux/4.0.4-1-ARCH; KDE/4.14.8; x86_64; ; ) 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-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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7788 Archived-At: --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--