[New-bugs-announce] [issue3587] Bad parsing of compiling regex with re.MULTILINE

Misha Seltzer report at bugs.python.org
Mon Aug 18 14:02:23 CEST 2008


New submission from Misha Seltzer <misha at seltzer.com>:

import re
regex = r"[\w]+"

# Normal behaviour:
>>> re.findall(regex, "hello world", re.M)
['hello', 'world']
>>> re.compile(regex).findall("hello world")
['hello', 'world']

# Bug behaviour:
>>> re.compile(regex).findall("hello world", re.M)
['rld']

----------
components: Regular Expressions
messages: 71323
nosy: misha
severity: normal
status: open
title: Bad parsing of compiling regex with re.MULTILINE
type: behavior
versions: Python 2.4, Python 2.5

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


More information about the New-bugs-announce mailing list