[docs] error in regular expression howto.

Georg Brandl georg at python.org
Sun Jul 1 09:36:36 CEST 2012

On 21.06.2012 14:41, Jonas Frey wrote:
> Hi,
> i think i found a little error in the regular expression howto
> (http://docs.python.org/py3k/howto/regex.html).
> Concerning \w, the howto states:
> \w
>      Matches any alphanumeric character; this is equivalent to the
> class [a-zA-Z0-9_].
> However, \w is *not* equivalent to [a-zA-Z0-9_].
> For example, the latter does not accept letterw with accents àéîü,
> whereas the former does.

Hi Jonas,

this is explained in the paragraph before the list of classes:

The equivalent classes are for bytes patterns. For a complete list of sequences 
and expanded class definitions for Unicode string patterns, see the last part of 
Regular Expression Syntax.


More information about the docs mailing list