Message190966
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. |
|
Date |
User |
Action |
Args |
2013-06-11 14:40:35 | hbock | set | recipients:
+ hbock, ezio.melotti, mrabarnett |
2013-06-11 14:40:35 | hbock | set | messageid: <1370961635.12.0.751109303707.issue18190@psf.upfronthosting.co.za> |
2013-06-11 14:40:35 | hbock | link | issue18190 messages |
2013-06-11 14:40:34 | hbock | create | |
|