Bug 92022 - \w is not an alias for [[:alnum:]]
\w is not an alias for [[:alnum:]]
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: sed (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-31 14:21 EDT by Dean K. Gibson
Modified: 2007-04-18 12:54 EDT (History)
0 users

See Also:
Fixed In Version: 4.0.7-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-07-03 09:48:49 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 Dean K. Gibson 2003-05-31 14:21:52 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
\w is supposed to be an alias for [[:alnum:]] in all regular expressions.  
However in the sed in RH 9, [[:alnum:]] matches digits, whereas \w does not.

\w is an alias for [[:alnum:]] in all recent versions of grep.

\w is an alias for [[:alnum:]] in the sed that was distributed with RH 7.0

It is broken in RH 9



Version-Release number of selected component (if applicable):
sed-4.0.5-1.rpm

How reproducible:
Always

Steps to Reproduce:
1. ANy trivial test case will show the bug!
2.
3.
    

Additional info:

The workaround is trivial';  substitute [[:alnum:]] for \w.  However, this bug 
will break a great number of existing scripts.
Comment 1 Dean K. Gibson 2003-06-01 14:10:02 EDT
\s is also supposed to match a white space character, and that doesn't work 
either.
Comment 2 Jakub Jelinek 2003-06-17 18:44:08 EDT
\w and \W fixed in glibc http://sources.redhat.com/ml/libc-hacker/2003-06/msg00033.html
and will make it into the next glibc rpm and into sed as well soon.
\s is a bug in sed documentation according to sed maintainer and will be killed
from the docs soon.
Comment 3 Jakub Jelinek 2003-07-03 09:48:49 EDT
sed-4.0.7-2 in rawhide uses glibc regex instead of its own copy,
so this should be fixed in sed-4.0.7-2 plus recent glibc.

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