[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Grep - possible bug with escaped brackets
From: |
Ayval Ron |
Subject: |
Grep - possible bug with escaped brackets |
Date: |
Sun, 5 Jun 2005 10:36:06 +0200 |
Hi,
I am using grep (or sometimes egrep) to validate various regular
expressions, and have come across a situation that looks like a bug.
Example below:
address@hidden root]# grep -V
grep (GNU grep) 2.5.1
address@hidden root]# echo "try[" | grep -e "try[\[]"
try[
(matches)
address@hidden root]# echo "try]" | grep -e "try[\]]"
address@hidden root]#
(no match)
Seems that escaping the closing bracket the should be matched does not
work, and that it is treated the same as a non-escaped bracket.
1. Is this bug documented?
2. Is it fixed somewhere?
Thanks,
Ayval
<mailto:address@hidden> <http://www.radware.com>
Confidentiality note: This message, and any attachments to it, contains
privileged/confidential information of RADWARE Ltd./RADWARE Inc. and may
not be disclosed, used, copied, or transmitted in any form or by any
means without prior written permission from RADWARE. If you are not the
intended recipient, delete the message and any attachments from your
system without reading or copying it, and kindly notify the sender by
e-mail. Thank you.
- Grep - possible bug with escaped brackets,
Ayval Ron <=