Bug#214107: locales: en_US.UTF-8 treats [ as a space char
At Mon, 3 Nov 2003 17:24:12 +0000,
Colin Watson wrote:
> On Tue, Nov 04, 2003 at 12:52:09AM +0900, GOTO Masanori wrote:
> > With 2.3.2.ds1-9,
> >
> > $ echo '[' | LANG=C egrep '[[:space:]]+$'
> > $ echo '[' | LANG=C egrep '^[^[:space:]]+$'
> > [
> >
> > Why don't you use [[:space:]] instead of ^[^[, or am I missing?
>
> '^[^[:space:]]+$' breaks down to:
>
> ^ start of line
> [^[:space:]]+ one or more non-whitespace characters
> $ end of line
>
> '[^[:space:]]' is the opposite of '[[:space:]]'.
Ah! Thanks, Colin.
It seems UTF-8 regex is broken.
Regards,
-- gotom
Reply to: