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年06月11日 14:40 by hbock, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg190966 - (view) | Author: Harry Bock (hbock) | Date: 2013年06月11日 14:40 | |
In Python 2.7.5, running re.search on regular expressions beginning with '.+' will raise RuntimeError if:
* the string being matched is empty
* the flags include re.DOTALL/re.S
>>> re.search(".+a", "", flags=re.S)
File "C:\Python27\lib\site-packages\IPython\core\interactiveshell.py", line 2731, in run_code
exec code_obj in self.user_global_ns, self.user_ns
File "<ipython-input-16-fefa32a418ba>", line 1, in <module>
myre.search("")
RuntimeError: internal error in regular expression engine
This does not occur if the input string is not empty, or if re.match is used instead of re.search, or if the re.S flag is omitted.
The bug does not occur on previous versions of Python 2.x, including 2.7.4.
|
|||
| msg190974 - (view) | Author: Matthew Barnett (mrabarnett) * (Python triager) | Date: 2013年06月11日 16:16 | |
Also in Python 3.3.2, but not Python 3.2. I haven't tested Python 3.3.1 or Python 3.3.0. |
|||
| msg190978 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2013年06月11日 17:49 | |
Thank you for your report. This is a duplicate of issue17998. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:46 | admin | set | github: 62390 |
| 2013年06月11日 17:49:53 | serhiy.storchaka | set | status: open -> closed superseder: internal error in regular expression engine nosy: + serhiy.storchaka messages: + msg190978 resolution: duplicate stage: resolved |
| 2013年06月11日 16:16:27 | mrabarnett | set | messages:
+ msg190974 versions: + Python 3.3 |
| 2013年06月11日 14:40:35 | hbock | create | |