bug-grep
[Top][All Lists]
Advanced

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

Re: have you ever mistyped [[:lower:]] as [:lower:] ?


From: Paolo Bonzini
Subject: Re: have you ever mistyped [[:lower:]] as [:lower:] ?
Date: Wed, 01 Sep 2010 16:09:39 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.0.5

On 09/01/2010 04:01 PM, Jim Meyering wrote:
Do you honestly imagine
http://opengroup.org/onlinepubs/007908775/xbd/re.html changed to say
"If a bracket expression consists of a colon, a series of alphabetic
characters, and another colon, the implementation's behavior is
undefined?

Perhaps that is where we disagree, then.
I do not require that POSIX allow the new behavior.

That may be it. In particular, I think for something that POSIX is unlikely to aver allow, there should be another way than POSIXLY_CORRECT to disable it.

 "We have nothing to fear but fear itself".
 But I doubt you're seriously worried about [A-Z], etc.

 Not worried, but it honestly would be a sensible warning whenever
 strcoll ("A", "f")<= 0&&  strcoll ("f", "Z")<= 0, as is the case in
 UTF-8 locales with glibc.  It will basically never do the right thing,
 since [A-Z] and [a-z] exclude a and Z respectively.

Ranges like [A-Z] are so common that changing the default
would have far-reaching effects.  Will it ever be possible?
I don't know.  Perhaps if we first allow it to be enabled via
some new environment variable, and then, much later, make it the default.

/me whispers --warn...

Paolo



reply via email to

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