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

From: [email-masked]
Date: Mon, 17 May 2021 15:39:38 +0000

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