This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2013年02月11日 19:39 by roysmith, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg181927 - (view) | Author: Roy Smith (roysmith) | Date: 2013年02月11日 19:39 | |
# Python 2.7.3 # Ubuntu 12.04 import re pattern = r"( ?P<phrase>.*)" regex = re.compile(pattern, re.VERBOSE) The above raises an exception in re.compile(): Traceback (most recent call last): File "./try.py", line 6, in <module> regex = re.compile(pattern, re.VERBOSE) File "/home/roy/env/python/lib/python2.7/re.py", line 190, in compile return _compile(pattern, flags) File "/home/roy/env/python/lib/python2.7/re.py", line 242, in _compile raise error, v # invalid expression sre_constants.error: nothing to repeat The problem appears to be that re.VERBOSE isn't ignoring the space after the "(". Maybe this is a duplicate of issue15606 ? |
|||
| msg181931 - (view) | Author: Matthew Barnett (mrabarnett) * (Python triager) | Date: 2013年02月11日 20:10 | |
It does look like a duplicate to me. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:41 | admin | set | github: 61386 |
| 2013年02月15日 21:08:18 | ezio.melotti | set | status: open -> closed superseder: re.VERBOSE whitespace behavior not completely documented stage: resolved resolution: duplicate versions: + Python 3.2, Python 3.3, Python 3.4 |
| 2013年02月11日 20:10:48 | mrabarnett | set | messages: + msg181931 |
| 2013年02月11日 19:52:35 | ezio.melotti | set | nosy:
+ ezio.melotti, mrabarnett components: + Regular Expressions |
| 2013年02月11日 19:39:08 | roysmith | create | |