New submission from Michał Leśniewski <mlesn...@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 <rep...@bugs.python.org> <http://bugs.python.org/issue13409> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com