Mailing List Archive

re group self-reference weird behavior (PR#2)
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?