Re:Debuggex: A visual regex debugger
by jacobparker on Saturday February 23, 2013 @11:39PM
(#5272864)
Interesting - it seems some browsers dont have this as an exponential edge case and indeed in those yours doesn't execute exponentially (I guess I got mixed up when testing.)
Anyway I dont consider it a "bug" or anything, just wanted to bring up the rsc paper for discussion :) Keep up the good work!
In order to ensure that my engine (I simulate a kind of NFA) matches what javascript's engine matches, every time I match on my engine, I also try to exact match using javascript's engine. Unfortunately, javascript's engine always uses backtracking, even when it doesn't need to. Obviously this code should have been turned off for production, and I'll fix it on the next push.
To replicate the crash on your own, try typing: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab'.match(/^(a)$/) in your console.