[issue10703] Regex 0.1.20101210

Steve Moran report at bugs.python.org
Wed Dec 15 11:30:16 CET 2010


Steve Moran <stiv at uw.edu> added the comment:

(Forehead slap.)

On Tue, 14 Dec 2010, Matthew Barnett wrote:

>
> Matthew Barnett <python at mrabarnett.plus.com> added the comment:
>
> The regex module is intended to replace the re module, so its default behaviour is the same: in Python 2, regexes default to matching ASCII, and in Python 3, they default to matching Unicode.
>
> If you want to use a regex on a Unicode string in Python 2 then you need to set the Unicode flag, either by providing the UNICODE flag or by putting "(?u)" in the regex itself.
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue10703>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10703>
_______________________________________


More information about the Python-bugs-list mailing list