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.

Author jpfisher
Recipients ezio.melotti, jpfisher, mrabarnett
Date 2014-08-01.20:44:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1406925892.62.0.916485678842.issue22119@psf.upfronthosting.co.za>
In-reply-to
Content
Some characters repeated in the pattern break re.match:


Linux python 2.7.6
###################################
# test.py
import re

#diffitem = "libstdc+"   succeeds
#diffitem = "libstdc++"  fails
#diffitem = "libstdc**"  fails
#diffitem = "libstdc.."  succeeds
diffitem = "libstdc+\+"  succeeds
line = "time  1.7-23build1"

result = re.match(diffitem, line)
print result

###################################
$ python  test.py
Traceback (most recent call last):
  File "test.py", line 9, in <module>
    result = re.match(diffitem, line)
  File "/usr/lib/python2.7/re.py", line 137, in match
    return _compile(pattern, flags).match(string)
  File "/usr/lib/python2.7/re.py", line 244, in _compile
    raise error, v # invalid expression
sre_constants.error: multiple repeat
History
Date User Action Args
2014-08-01 20:44:52jpfishersetrecipients: + jpfisher, ezio.melotti, mrabarnett
2014-08-01 20:44:52jpfishersetmessageid: <1406925892.62.0.916485678842.issue22119@psf.upfronthosting.co.za>
2014-08-01 20:44:52jpfisherlinkissue22119 messages
2014-08-01 20:44:52jpfishercreate