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 serhiy.storchaka
Recipients georg.brandl, nevsan, serhiy.storchaka
Date 2017-03-22.18:57:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1490209023.94.0.711818089952.issue29869@psf.upfronthosting.co.za>
In-reply-to
Content
I suggest to use my regular expression for haxadedecimals. Your regular expression starves from catastrophic backtracking. Compare two examples:

re.match(r'0[xX]_?[\da-fA-F]+(?:_[\da-fA-F]+)*[lL]?'+r'\b', '0x'+'0'*100+'z')
re.match(r'0[xX](?:_?[\da-fA-F]+)+[lL]?'+r'\b', '0x'+'0'*100+'z')
History
Date User Action Args
2017-03-22 18:57:03serhiy.storchakasetrecipients: + serhiy.storchaka, georg.brandl, nevsan
2017-03-22 18:57:03serhiy.storchakasetmessageid: <1490209023.94.0.711818089952.issue29869@psf.upfronthosting.co.za>
2017-03-22 18:57:03serhiy.storchakalinkissue29869 messages
2017-03-22 18:57:03serhiy.storchakacreate