There's a new version of the patch http://www.python.org/sf/757624 I understood there was some problems with the first implementation, and changed some aspects of how the new implementation works to fix them. This new implementation is more complex than the other implementations (mine, and the original), given the many details it covers, but is probably faster than these implementations in all situations (tests very welcome). Additionally, it introduces new features like infinite loop protection (*matching* the REs, not preventing their use). Here is a list of valid REs not accepted by the original implementation, and gracefully working on the new implementation (these used to blow up SRE with an infinite loop, not because the implementation was recursive). re.match("(a?)+ab", "ab") re.match("^(a|b?)+a$", "a") re.match("(a*)+?ac", "ab") re.match("((a)*)+?ac", "ab") re.match("(?=a)*", "a") Here is a list of unusual REs I've built while I was understanding how complex the operations could be. All of them work. re.search('(.*?)(?http://niemeyer.net