homepage

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 techmaurice
Recipients brian.curtin, ezio.melotti, mrabarnett, techmaurice, vstinner
Date 2011年10月14日.11:07:27
SpamBayes Score 3.8627398e-08
Marked as misclassified No
Message-id <1318590448.37.0.0633346195508.issue13169@psf.upfronthosting.co.za>
In-reply-to
Content
So if I understand correctly, the maximum of 65535 repetitions is by design?
Have tried a workaround by repeating the repetitions by placing it inside a capturing group, which is perfectly legal with Perl regular expressions:
$mystring = "test";
if($mystring =~ m/^(.{0,32766}){0,3}test/s) { print "Yes\n"; }
(32766 being the max repetitions in Perl)
Unfortunately, in Python this does not work and raises a "nothing to repeat" sre_constants error:
re.search('(?s)\A(.{0,65535}){0,3}test', 'test')
This, however works, which yields 65536 repetitions of DOTALL:
re.search('(?s)\A.{0,65535}.{0,1}test', 'test')
In the end this solves my problem sort or less, but requires extra logic in my script and complicates stuff unnecessary.
A suggestion might be to make repetitions of repeats possible?
History
Date User Action Args
2011年10月14日 11:07:28techmauricesetrecipients: + techmaurice, vstinner, ezio.melotti, mrabarnett, brian.curtin
2011年10月14日 11:07:28techmauricesetmessageid: <1318590448.37.0.0633346195508.issue13169@psf.upfronthosting.co.za>
2011年10月14日 11:07:27techmauricelinkissue13169 messages
2011年10月14日 11:07:27techmauricecreate

AltStyle によって変換されたページ (->オリジナル) /