[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to use ']' in the upper bound of a range character set
From: |
Arlinta Barus |
Subject: |
Re: How to use ']' in the upper bound of a range character set |
Date: |
Fri, 22 May 2009 05:42:37 +1000 |
Thanks for the reply.
" We can't use and/or escape `]' between `[' and `]' in grep and egrep". So
does it mean that grep cannot support a range character set that the end of the
range is character ']' ? Because in the real problems, it is possible that we
want to find a character in a range such that ']' is the end of the range.
Was this weakness realized in previous developments of grep ? or is it just "a
bug" that has not been handled so far?
Thanks.
>>> Norihiro Tanaka <address@hidden> 22/05/09 1:29 AM >>>
Hi,
We can't use and/or escape `]' between `[' and `]' in grep and
egrep. Given cases is interpreted respectively as follows.
- grep -E "[1-\]]" file_input
[1-\] ] CAT
where [1-\] is range cset.
- grep -E "[1-\\]]" file_input
[1-\\] ] CAT
where [1-\\] is cset. it's able to expand as following ...
\([1-\]\|\\\)
- grep -E "[1-]]" file_input
[1-] ] CAT
where [1-] is range cset which is endless.
- Re: How to use ']' in the upper bound of a range character set,
Arlinta Barus <=