[issue13409] Invalid expression error if a regex ends with a backslash
Michał Leśniewski
report at bugs.python.org
Tue Nov 15 20:01:14 CET 2011
New submission from Michał Leśniewski <mlesniew at gmail.com>:
If a regular expression ends with a backslash, an exception is raised. Of course, the backslash has to be escaped. The simplest example, that causes the error is a regular expression, that should match only a single backslash:
import re
r = re.compile("\\")
----------
components: Regular Expressions
messages: 147696
nosy: ezio.melotti, mlesniew
priority: normal
severity: normal
status: open
title: Invalid expression error if a regex ends with a backslash
type: behavior
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13409>
_______________________________________
More information about the Python-bugs-list
mailing list