bug-grep
[Top][All Lists]
Advanced

[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: Norihiro Tanaka
Subject: Re: How to use ']' in the upper bound of a range character set
Date: Fri, 22 May 2009 00:28:30 +0900

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

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