[Python-bugs-list] re group self-reference weird behavior (PR#2)
guido@python.org
guido@python.org
Mon, 12 Jul 1999 15:03:25 -0400 (EDT)
Full_Name: Guido van Rossum
Version: 1.5.2
OS: Unix, Windows
Submission from: eric.cnri.reston.va.us (132.151.1.38)
Try the following:
import re
re.search("((.)\\1+)","a")
This isn't proper syntax (you shouldn't reference a group
inside itself), but it seems to hang -- in fact it takes
several minutes to execute.
Possibly it runs out of some resource on its path to infinite
recursion and then backtracks?