On Mon, Jul 17, 2023, 12:09 Chet Ramey <chet.ra...@case.edu> wrote:

> I guess we'll see how much the text of regerror(3)
> error messages varies across regexp implementations.
>

Is that a concern? The GNU strings [1] are translated and even their
untranslated text does differ from that of the BSD ones [2].

The set of errors is also different, e.g. REG_EMPTY is only in BSD because
its regcomp() does not accept `()' while GNU's does.  But it's precisely
this difference that I think would help clue users into why their scripts
work on one platform and not another.


[1]:
https://sourceware.org/git/?p=glibc.git;a=blob;f=posix/regcomp.c;h=12650714c06890d99a6a7aaa96437a2f83cc973b;hb=HEAD#l132

[2]:
https://cgit.freebsd.org/src/tree/lib/libc/regex/regerror.c?id=8a16b7a18f5d0b031f09832fd7752fba717e2a97#n90

Reply via email to