bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: [Bug-gnu-utils] grep (GNU grep) 2.4.2 bug report


From: Paul Eggert
Subject: Re: [Bug-gnu-utils] grep (GNU grep) 2.4.2 bug report
Date: 23 Sep 2000 20:17:36 -0700
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

address@hidden (Chris Pollitt) writes:

> $echo D | grep '[c-d]'
> D
> 
> $echo D | grep '[d-e]'
> 

The following text is taken from the grep info manual after it has
been patched with all the patches I've sent in.  It should explain
things.

-----

Within a bracket expression, a "range expression" consists of two
characters separated by a hyphen.  It matches any single character that
sorts between the two characters, inclusive, using the locale's
collating sequence and character set.  For example, in the default C
locale, `[a-d]' is equivalent to `[abcd]'.  Many locales sort
characters in dictionary order, and in these locales `[a-d]' is
typically not equivalent to `[abcd]'; it might be equivalent to
`[aBbCcDd]', for example.  To obtain the traditional interpretation of
bracket expressions, you can use the C locale by setting the `LC_ALL'
environment variable to the value `C'.


reply via email to

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