Re: [pcre-dev] several messages

Página superior
Eliminar este mensaje
Autor: ND
Fecha:  
A: Pcre-dev
Asunto: Re: [pcre-dev] several messages
On 2012-01-22 20:04, Philip Hazel wrote:

>> - PCRE must say (may be at compile time) to main application that
> pattern
> > contains lookbehind
>If PCRE remembers lookbehinds, then a PCRE_INFO option could do that. I
> presume you want this so that the application can expect zero-length
> partial matches.
>


No. If PCRE can not calculate the length of the longest lookbehind in
pattern then main application must know that string returned for a partial
match may be not long enough and may be more symbols needed to keep.

If PCRE can calculate the length of the longest lookbehind in pattern then
it can simply returns it. Value 0 means that no lookbehinds present in
pattern.