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 <[email protected]> 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.







Reply via email to