http://www.oreilly.com/catalog/errataunconfirmed.csp?isbn=0636920023630
Footnote 2:
If there are n characters between the double quote and the end of the string, the regex engine will try 2 1/n permutations of ‹ (?:[^"\r\n]+|"")* ›
----
it appears: 2^(1/n)
(this trends to 1, when n grows)
however, it must say 2^(n-1)
when n=4 the number of permutations is 8.
(thus, it has an exponential behaviour).
No comments :
Post a Comment