On Wed, 03 Feb 2016 06:19:43 -0500, Nicolas Goaziou <m...@nicolasgoaziou.fr> wrote:

"Loris Bennett" <loris.benn...@fu-berlin.de> writes:

  re-search-forward("^[^%]*\\\\usepackage.*{biblatex}" nil t)

This is a pathological regexp. [^%] is anything but a percent sign, so
it can contain newline characters. Basically [^%]* can match an entire
buffer if it doesn't contain any %.

I think the regexp used in `reftex-using-biblatex-p' should be

  "^[^%\n]*\\\\usepackage.*{biblatex}"

Here's a link about the extreme difficulty of detecting pathological regular expressions:

https://mail.python.org/pipermail/python-dev/2003-May/035916.html

The author analyses the exponential not-found situation for (x+x+)+y and then suggests that for larger expressions, "... no more than 1 programmer in 1000 has even a vague idea how to start looking for such problems."

Reply via email to