bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Does gawk character classes follow this?


From: arnold
Subject: Re: [bug-gawk] Does gawk character classes follow this?
Date: Fri, 15 Feb 2019 02:26:01 -0700
User-agent: Heirloom mailx 12.5 7/5/10

Hi Eli.

Eli Zaretskii <address@hidden> wrote:

> > [:alnum:]   [a-zA-Z0-9]
> > [:alpha:]   [a-zA-Z]
> > [:ascii:]   [\x00-\x7F]
> > [:cntrl:]  [\x00-\x1F\x7F]
>
> Doesn't the meaning of these character classes depend on the
> implementation of the regex library with which Gawk was linked?

Yes and no. Gawk always links with the included regex and dfa routines,
so there really isn't an option to use a different regex library.

That said, gawk's routines use the underlying C library ctype/wctype
routines to check those classes. (Gawk doesn't have [:ascii:], by
the way.)

On systems that understand locales, the C library returns true/false
for a given character / wide character based on the locale's settings.

HTH,

Arnold



reply via email to

[Prev in Thread] Current Thread [Next in Thread]