Bug 104693 - Regular Expressions doesn't working properly
Summary: Regular Expressions doesn't working properly
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: grep   
(Show other bugs)
Version: 9
Hardware: i686 Linux
medium
high
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Mike McLean
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-09-19 07:56 UTC by Stefan Stay
Modified: 2007-04-18 16:57 UTC (History)
0 users

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


Attachments (Terms of Use)

Description Stefan Stay 2003-09-19 07:56:09 UTC
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 08:25:15 UTC
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.