I know that Python can tell if a loop is infinite, although I'm not sure if that behavior applies to Regex (and I can't test it -- I couldn't write an infinite search if required...but if you provide one, I will). What I mean is that there may be something of interest in their source.

Thomas Allen

2008/9/8 Hans-Jörg Bibiko <bibiko@eva.mpg.de>
On 07.09.2008, at 15:06, Allan Odgaard wrote:
> On 4 Sep 2008, at 10:44, Hans-Jörg Bibiko wrote:
>> [...]
>> [ATTENTION TextMate will freeze!!!!]
>>>
>> [...]
>> Of course, this is a problem of the regexp but if one wants to
>> develop
>> such a regexp such errors could appear. The question now is how to
>> interrupt such an eternal regexp loop??
>> To be honest I have no idea but maybe one could listen to the
>> keyboard
>> event (APPLE+.) inside of the regexp function.
>
> It's easier said than done (allowing graceful aborting of exponential
> time regexps)
Unfortunately I know ;)

> but it is something which is on the radar.
Thanks!

--Hans


_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate