Regexp functions fail silently when stack limit is exceeded var re = new RegExp("(\cd{4,}|[(\u006c)]*?)*", "imy"); "foo".match(re); All this does is print: jsRegExpExecute failed with result -5 To the console. I would have expected it to throw an exception.
What does Firefox or MSIE do in this case?
Changing this will be very simple once we decide what behavior we want.
Actually this same regexp fails that way: var re = new RegExp("(a*)*"); "a".match(re); Which it shouldn't. This is a bug in our regexp correctness.