Re: [pcre-dev] Quantifying backtracking verbs

Página superior
Eliminar este mensaje
Autor: ND
Fecha:  
A: Pcre-dev
Asunto: Re: [pcre-dev] Quantifying backtracking verbs
On 2019-06-10 16:47, ph10 wrote:

>I have done this, and committed the result. However, it seems to me that
> /a(*ACCEPT)??bc/ is the same as a(?:bc|) though if a, b, and c are
> complex it may be easier to read.
>


A following example was included in docs (pcre2pattern.html) :

A(*ACCEPT)??BC


But this example does not show what we can do with (*ACCESS)?? that can't
doing well with another PCRE facilities.
I suggest to show in docs another example that was posted earlier in this
thread:

(a(*ACCEPT)??b)c


In this example we want to match "abc" or "a" AND capture all but "c".