Re: JSON regular expression fails to recognize JSON in Netscape <= 7.1
- View Source--- In email@example.com, "Peter Michaux" <petermichaux@...> wrote:
> I just did some tests in some version of Netscape Navigator. The
> following fails in version <= 7.1 because the regular expression can't
> match the double quotes around the letter 'a' in the json string being
> compared to the regular expression. Both NN7.2 and Firefox 1.0 both
> return true for this test.
>I don't know what was wrong with NN6. If I were to guess, it would be
> manipulation, Events) and it seems ashame this regular expression is
> the single part of the JSON library that requires such a new browser.
> Would there be a way to write this regular expression so it works as
> far back as NN6 or at least farther back than NN7.2? If not what is it
> in the regular expression that is failing to recognize this simple
> JSON string?
that it did not support the lazy quantifiers, *? and +?. If you
replaced them with the greedy quantifiers, * and +, it might work.
But there is a bug in IE6 in which the greedy quantifiers cause the
regexp to run in exponential time. When the text gets big, IE gets
really really slow.