Comment #1 on issue 2254 by [email protected]: Negated regexp character class take unusually long to evaluate.
http://code.google.com/p/v8/issues/detail?id=2254
The first case takes exponential time because [^a] includes c, and back tracking takes up all the time.
We could notice that the pattern does not match since b is not part of the subject string. We already do smart multi-pass checks for elements of a TextNode. however, text class in quantifiers are not included as elements of a TextNode.
-- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
