Bug 49003 - ] character cannot be used in a character list regexp
Summary: ] character cannot be used in a character list regexp
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: grep
Version: 7.1
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-07-12 22:53 UTC by Vijay Seshadri
Modified: 2007-04-18 16:34 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-07-12 22:53:05 UTC
Embargoed:


Attachments (Terms of Use)

Description Vijay Seshadri 2001-07-12 22:53:01 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.2-2 i686)

Description of problem:
Problem Explanation: The Character ']' cannot be used inside a character
list. The GNU documentation says that to use this in  a character list, put
it in the beginning of the list. The same is the observation for '^'
character.(which the doc says should in anywhere but first)
BTW, the same command works fine in solaris.


How reproducible:
Always

Steps to Reproduce:
1. grep -E '[]a]' <file> where file contains a ] charater somewhere
2. Also, please make sure the line that contains the char ] does *not*
contain 'a'.
3.
	

Actual Results:  Does not print the line containing the ]

Expected Results:  It should print the line containing a ]

Additional info:

grep version number 2.4.2

Comment 1 Bernhard Rosenkraenzer 2001-07-17 10:15:40 UTC
Fixed in 2.4.2-7



Note You need to log in before you can comment on or make changes to this bug.