bug#48480: [a-Z] is not a valid regex range in 3.0.7

2021-05-17 Thread Marius Bakke
Taylan Kammer  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
Description: PGP signature


bug#48480: [a-Z] is not a valid regex range in 3.0.7

2021-05-17 Thread dsmich
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




bug#48480: [a-Z] is not a valid regex range in 3.0.7

2021-05-17 Thread Taylan Kammer
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





bug#48480: [a-Z] is not a valid regex range in 3.0.7

2021-05-17 Thread Marius Bakke
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
Description: PGP signature