[pcre-dev] [Bug 2725] (*SKIP)(*F) within a (?(DEFINE)) does …

Top Page

Reply to this message
Author: admin
To: pcre-dev
Subject: [pcre-dev] [Bug 2725] (*SKIP)(*F) within a (?(DEFINE)) does not skip position

onlinecop@??? changed:

           What    |Removed                     |Added
                 CC|                            |onlinecop@???

--- Comment #1 from onlinecop@??? ---
When /(*SKIP)(*F)/ is used outside of a (?(DEFINE)...) group, the bumpalong
moves to the location where (*SKIP) was encountered. Given the pattern:


on the literal text:

"key": { "k1":"v1", "k2":"v2" }

(or on the escaped text):

"\"key\": { \"k1\":\"v1\", \"k2\":\"v2\" }"

then both PCRE2 and perl return this output:


However, if that same pattern is moved into a (?(DEFINE)...) block like this:


The results in PCRE2 are:

["\": { \"","\":\"","\", \"",":"]

The results in perl are:


Instead of (*SKIP) moving the bumpalong position when it failed within the
(?(DEFINE)...) group, it moved to the next text position and tried to match

You are receiving this mail because:
You are on the CC list for the bug.