bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18817: \w is not synonym for [[:alnum:]] in UTF-8 locales


From: Jaroslav Skarvada
Subject: bug#18817: \w is not synonym for [[:alnum:]] in UTF-8 locales
Date: Fri, 24 Oct 2014 10:19:49 -0400 (EDT)

Hi,

in the man page there is the following sentence:

"The symbol \w is a synonym for [_[:alnum:]] and \W is a synonym for 
[^_[:alnum:]]"

Not counting that in man pages for some other languages (e.g. czech) there is 
written
that \w is a synonym for [[:alnum:]] and \W is a synonym for [^[:alnum:]], but
none of them seems to be synonym for \w | \W in UTF-8 locales:

$ export LANG=en_US.UTF-8

$ echo 'á' | grep '[[:alnum:]]'
á
$ echo 'á' | grep '[_[:alnum:]]'
á
$ echo 'á' | grep '\w'

$ echo 'á' | grep '[^[:alnum:]]'
$ echo 'á' | grep '[^_[:alnum:]]'
$ echo 'á' | grep '\W'
á

$ grep --version
grep (GNU grep) 2.20
...





reply via email to

[Prev in Thread] Current Thread [Next in Thread]