Re: [pcre-dev] PCRE_STUDY_JIT_COMPILE option bug?

Páxina inicial
Borrar esta mensaxe
Autor: ph10
Data:  
Para: Ervin Hegedüs
CC: pcre-dev
Asunto: Re: [pcre-dev] PCRE_STUDY_JIT_COMPILE option bug?
On Sat, 26 Jan 2019, Ervin Hegedüs via Pcre-dev wrote:

> (Note, that there is a 3rd solution, we ignore the
> PCRE_STUDY_JIT_COMPILE flag, and uses pcre_study() without that...)


And, it occurs to me overnight, there may be another "solution". Do you
actually use the values of the captured substrings? If all you are
interested in is whether or not the pattern matches, all you need to do
is change the test of the return code from > 0 to >= 0 and you are done.
Alternatively, set the PCRE_NO_AUTO_CAPTURE option on pcre_compile() and
it won't capture anything.

Philip

--
Philip Hazel