bug-gnulib
[Top][All Lists]
Advanced

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

Re: Dealing with character ranges in grep


From: Jim Meyering
Subject: Re: Dealing with character ranges in grep
Date: Thu, 16 Jun 2011 10:44:09 +0200

Jim Meyering wrote:
...
>> Thus, if we go this route, we are effectively saying
>> that people who want self-consistent regex-handling
>> in our tools must build with --with-included-regex or end
>> up causing subtle problems.
>>
>> That's a big leap.
>> I'm not saying I won't take upstream grep over the edge,
>> but I'd like to hear what a few distro-maintainers think.
>
> To clarify...
> I like Arnold's proposal to make regex range handling sane
> and locale-independent.
>
> It goes like this (at least for gawk, grep and sed):
>
>   change how dfa.c interprets ranges like [a-z]
>   change how gnulib's reg* code handles ranges
>
> Always use the included regex code (the one from gnulib),
> so that its interpretation is consistent with that of dfa.c.
>
> Grep's current upstream default is to build --with-included-regex,
> which makes grep use glibc's regex code.
>
> To make this proposed change go through, that configure-time option would
> have to be eliminated, so that we always build with the gnulib-provided
> regex code.  Of course, if glibc ever changes, we can detect that and
> automatically prefer it when possible.

For the record, at least Fedora's grep and sed both build
--without-included-regex, so would be affected.



reply via email to

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