[issue17568] re: Infinite loop with repeated empty alternative

2013-04-03 Thread Ezio Melotti
Ezio Melotti added the comment: I can reproduce on 3.2.3, but otherwise this work fine in the upcoming 3.2.4 and on 3.3+. -- resolution: -> out of date stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue17568] re: Infinite loop with repeated empty alternative

2013-03-29 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett type: enhancement -> behavior ___ Python tracker ___ ___

[issue17568] re: Infinite loop with repeated empty alternative

2013-03-28 Thread Eric Promislow
New submission from Eric Promislow: >>> import re >>> p = re.compile(r'^(?:\\"|.|)*?"', re.S|re.M) >>> s = 'sub foo {\n\tprint "\n\t\tbar\n\t\t";\n}\n' >>> m = p.findall(s) Python doesn't return. Dropping the last "|" in the pattern fixes this. Regex engines in Perl, PHP, JS, and Ruby all hand