Bug 104693 - Regular Expressions doesn't working properly
Regular Expressions doesn't working properly
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: grep (Show other bugs)
9
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Tim Waugh
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-09-19 03:56 EDT by Stefan Stay
Modified: 2007-04-18 12:57 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-09-19 04:25:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stefan Stay 2003-09-19 03:56:09 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
when searching for lines, which begin with an uppercase letter,
grep finds all lines, including those with lowercase letters.

Example Textfile:

Abcdef
Ghijkl
mnopqr
stuvwxyz

The following command will display all lines of the above file:

grep '^[A-Z].*' <filename>

Version-Release number of selected component (if applicable):
grep-2.5.1-7

How reproducible:
Always

Steps to Reproduce:
1. See above
2.
3.
    

Additional info:
Comment 1 Tim Waugh 2003-09-19 04:25:15 EDT
The grep man page addresses this point quite clearly.  ISO 14651, which is the
sorting standard, specifies this behaviour.  You can
also find some information in the strcoll documentation.

IEEE Std 1003.1, 2003 Edition says that grep uses the current locale as the
"locale for the behavior of ranges".

I think you meant to use '[[:upper:]]', as the grep man page suggests.

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