Auteur: Philip Hazel Date: À: G.. CC: exim-dev Sujet: Re: [exim-dev] PCRE_ERROR_MATCHLIMIT for simple string/pattern
On Mon, 15 Sep 2008, G.. wrote:
> I'm not sure if this is a pcre bug. One gets a PCRE_ERROR_MATCHLIMIT (Error
> -8) for the following fairly simple pattern/string pair:
>
> prompt> pcretest
> PCRE version 7.8 2008-09-05
>
> re> '(\s*-*\d+[.]*\d*\s*)+\n'
My instant reaction to that pattern is "nested unlimited repeats -
Beware, Beware!" That kind of pattern is always in danger of running
into PCRE_ERROR_MATCHLIMIT because the size of the search tree explodes
exponentially.
> data>
> '\t4\n0000\t-0.00\t-0.0000\t4\t-0.00\t-0.0000\t4\n0000\t-0.00\t-0.0000\t0\t-0.00\t-'
> Error -8
I have not analyzed your data, but I'm not at all surprised. Note that,
for pcretest, you should not put the data in delimiters. In your
example, the quotes will be taken as part of the data.