Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 49003 - ] character cannot be used in a character list regexp
] character cannot be used in a character list regexp
Product: Red Hat Linux
Classification: Retired
Component: grep (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Aaron Brown
Depends On:
  Show dependency treegraph
Reported: 2001-07-12 18:53 EDT by Vijay Seshadri
Modified: 2007-04-18 12:34 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-07-12 18:53:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Vijay Seshadri 2001-07-12 18:53:01 EDT
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:

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'.

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 06:15:40 EDT
Fixed in 2.4.2-7

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