GNU bug report logs - #48480
[a-Z] is not a valid regex range in 3.0.7

Previous Next

Package: guile;

Reported by: Marius Bakke <marius <at> gnu.org>

Date: Mon, 17 May 2021 15:10:01 UTC

Severity: normal

Done: Marius Bakke <marius <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48480 in the body.
You can then email your comments to 48480 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#48480; Package guile. (Mon, 17 May 2021 15:10:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Marius Bakke <marius <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Mon, 17 May 2021 15:10:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <marius <at> gnu.org>
To: bug-guile <at> gnu.org
Subject: [a-Z] is not a valid regex range in 3.0.7
Date: Mon, 17 May 2021 17:09:45 +0200
[Message part 1 (text/plain, inline)]
Hello,

(make-regexp "[a-Z]") fails in Guile 3.0.7 with "Invalid range end".

This is a regression since 3.0.5.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guile <at> gnu.org:
bug#48480; Package guile. (Mon, 17 May 2021 15:35:02 GMT) Full text and rfc822 format available.

Message #8 received at 48480 <at> debbugs.gnu.org (full text, mbox):

From: Taylan Kammer <taylan.kammer <at> gmail.com>
To: Marius Bakke <marius <at> gnu.org>, 48480 <at> debbugs.gnu.org
Subject: Re: bug#48480: [a-Z] is not a valid regex range in 3.0.7
Date: Mon, 17 May 2021 17:33:47 +0200
On 17.05.2021 17:09, Marius Bakke wrote:
> Hello,
> 
> (make-regexp "[a-Z]") fails in Guile 3.0.7 with "Invalid range end".
> 
> This is a regression since 3.0.5.
> 

I think that's normal.

  $ grep -E '[a-Z]'
  grep: Invalid range end

You're supposed to use [a-zA-Z] or better yet, something locale-aware
such as [[:alpha:]].

I get the same error on Guile 2.2, are you sure that it ever worked?

-- 
Taylan




Information forwarded to bug-guile <at> gnu.org:
bug#48480; Package guile. (Mon, 17 May 2021 15:40:01 GMT) Full text and rfc822 format available.

Message #11 received at 48480 <at> debbugs.gnu.org (full text, mbox):

From: dsmich <at> roadrunner.com
To: "'Marius Bakke'" <marius <at> gnu.org>
Cc: "'48480 <at> debbugs.gnu.org'" <48480 <at> debbugs.gnu.org>
Subject: RE: bug#48480: [a-Z] is not a valid regex range in 3.0.7
Date: Mon, 17 May 2021 15:39:38 +0000
[Message part 1 (text/plain, inline)]
This *is* the error returned by the underlying C library. For example:

#include 
#include 
#include 

int main() {
 char buf[128] = {0};
 regex_t rx = {0};
 int status = regcomp(&rx, "[a-Z]", REG_EXTENDED);
 size_t ret = regerror(status, &rx, buf, sizeof buf);
 printf("status: %d, ret: %d, buf: [%s]n", status, ret, buf);
 return 0;
}

gcc -o rx rx.c && ./rx
status: 11, ret: 18, buf: [Invalid range end]

--Dale


[Message part 2 (text/html, inline)]

Reply sent to Marius Bakke <marius <at> gnu.org>:
You have taken responsibility. (Mon, 17 May 2021 15:58:02 GMT) Full text and rfc822 format available.

Notification sent to Marius Bakke <marius <at> gnu.org>:
bug acknowledged by developer. (Mon, 17 May 2021 15:58:02 GMT) Full text and rfc822 format available.

Message #16 received at 48480-done <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <marius <at> gnu.org>
To: Taylan Kammer <taylan.kammer <at> gmail.com>, 48480-done <at> debbugs.gnu.org
Cc: dsmich <at> roadrunner.com
Subject: Re: bug#48480: [a-Z] is not a valid regex range in 3.0.7
Date: Mon, 17 May 2021 17:57:05 +0200
[Message part 1 (text/plain, inline)]
Taylan Kammer <taylan.kammer <at> gmail.com> skriver:

> On 17.05.2021 17:09, Marius Bakke wrote:
>> Hello,
>> 
>> (make-regexp "[a-Z]") fails in Guile 3.0.7 with "Invalid range end".
>> 
>> This is a regression since 3.0.5.
>> 
>
> I think that's normal.
>
>   $ grep -E '[a-Z]'
>   grep: Invalid range end
>
> You're supposed to use [a-zA-Z] or better yet, something locale-aware
> such as [[:alpha:]].
>
> I get the same error on Guile 2.2, are you sure that it ever worked?

Oh indeed, this appears to be because of a behavior change in glibc.

Closing the issue, thanks for the prompt feedback!
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 15 Jun 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 89 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.