Bug 92022 - \w is not an alias for [[:alnum:]]
Summary: \w is not an alias for [[:alnum:]]
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: sed   
(Show other bugs)
Version: 9
Hardware: All Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Ben Levenson
Depends On:
TreeView+ depends on / blocked
Reported: 2003-05-31 18:21 UTC by Dean K. Gibson
Modified: 2007-04-18 16:54 UTC (History)
0 users

Fixed In Version: 4.0.7-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-07-03 13:48:49 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Dean K. Gibson 2003-05-31 18:21:52 UTC
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):

How reproducible:

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

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 18:10:02 UTC
\s is also supposed to match a white space character, and that doesn't work 

Comment 2 Jakub Jelinek 2003-06-17 22:44:08 UTC
\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 13:48:49 UTC
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.