Re: [pcre-dev] What is the expected behavior of /(?=..(*MAR…

トップ ページ
このメッセージを削除
著者: ph10
日付:  
To: Thanh Hong Dai
CC: pcre-dev
題目: Re: [pcre-dev] What is the expected behavior of /(?=..(*MARK:a))(*SKIP:a)(*FAIL)|./g
On Mon, 21 Mar 2016, Thanh Hong Dai wrote:

> Does it mean that (*SKIP:label) looks for the (*MARK:label) in the
> regex execution stack to figure out where to bump along to?


This is a quote from the pcre2pattern page:

When (*SKIP) has an associated name, its behaviour is modified. When
it is triggered, the previous path through the pattern is searched for
the most recent (*MARK) that has the same name. If one is found, the
"bumpalong" advance is to the subject position that corresponds to
that (*MARK) instead of to where (*SKIP) was encountered. If no
(*MARK) with a matching name is found, the (*SKIP) is ignored.

Philip

--
Philip Hazel