unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#48480: [a-Z] is not a valid regex range in 3.0.7
@ 2021-05-17 15:09 Marius Bakke
  2021-05-17 15:33 ` Taylan Kammer
  2021-05-17 15:39 ` dsmich
  0 siblings, 2 replies; 4+ messages in thread
From: Marius Bakke @ 2021-05-17 15:09 UTC (permalink / raw)
  To: 48480

[-- Attachment #1: Type: text/plain, Size: 112 bytes --]

Hello,

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

This is a regression since 3.0.5.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#48480: [a-Z] is not a valid regex range in 3.0.7
  2021-05-17 15:09 bug#48480: [a-Z] is not a valid regex range in 3.0.7 Marius Bakke
@ 2021-05-17 15:33 ` Taylan Kammer
  2021-05-17 15:57   ` Marius Bakke
  2021-05-17 15:39 ` dsmich
  1 sibling, 1 reply; 4+ messages in thread
From: Taylan Kammer @ 2021-05-17 15:33 UTC (permalink / raw)
  To: Marius Bakke, 48480

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#48480: [a-Z] is not a valid regex range in 3.0.7
  2021-05-17 15:09 bug#48480: [a-Z] is not a valid regex range in 3.0.7 Marius Bakke
  2021-05-17 15:33 ` Taylan Kammer
@ 2021-05-17 15:39 ` dsmich
  1 sibling, 0 replies; 4+ messages in thread
From: dsmich @ 2021-05-17 15:39 UTC (permalink / raw)
  To: 'Marius Bakke'; +Cc: '48480@debbugs.gnu.org'

[-- Attachment #1: Type: text/plain, Size: 438 bytes --]

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



[-- Attachment #2: Type: text/html, Size: 651 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#48480: [a-Z] is not a valid regex range in 3.0.7
  2021-05-17 15:33 ` Taylan Kammer
@ 2021-05-17 15:57   ` Marius Bakke
  0 siblings, 0 replies; 4+ messages in thread
From: Marius Bakke @ 2021-05-17 15:57 UTC (permalink / raw)
  To: Taylan Kammer, 48480-done

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

Taylan Kammer <taylan.kammer@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!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-17 15:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17 15:09 bug#48480: [a-Z] is not a valid regex range in 3.0.7 Marius Bakke
2021-05-17 15:33 ` Taylan Kammer
2021-05-17 15:57   ` Marius Bakke
2021-05-17 15:39 ` dsmich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).