Re: [pcre-dev] Problem with a regexp

Páxina inicial
Borrar esta mensaxe
Autor: Philip Hazel
Data:  
Para: Thomas Weber
CC: pcre-dev
Asunto: Re: [pcre-dev] Problem with a regexp
On Thu, 18 Sep 2008, Thomas Weber wrote:

> So, would a feasible solution look like the following:
>
> 1) Try with the default values on MATCH_LIMIT. 
> 2) If that fails, check with (the equivalent of) \M and use that value
>    for a second calculation?


That would work, I suppose. But it would be slow (\M works by trying and
retrying). Much better if you can write the regex more efficiently in
the first place (using a possessive quantifier when needed). :-)

Philip

--
Philip Hazel