Bug#214107: locales: en_US.UTF-8 treats [ as a space char
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:]]'.
Cheers,
--
Colin Watson [cjwatson@flatline.org.uk]
Reply to: