10 January 2014

Regular Expressions Cookbook: Errata

Nuevo errata encontrado, ahora es uno matemático de una fórmula mal escrita... me imagino que el autor sabia que poner, pero se tuvo que traspapelar la fórmula.


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).

My Blog List

Blog Archive


The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.