[pcre-dev] [Bug 2325] New: Backreference erroneously seen as…

Pàgina inicial
Delete this message
Autor: admin
Data:  
A: pcre-dev
Assumpte: [pcre-dev] [Bug 2325] New: Backreference erroneously seen as both set and unset in subroutine call
https://bugs.exim.org/show_bug.cgi?id=2325

            Bug ID: 2325
           Summary: Backreference erroneously seen as both set and unset
                    in subroutine call
           Product: PCRE
           Version: 8.42
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
          Assignee: ph10@???
          Reporter: tattarakis@???
                CC: pcre-dev@???


This is a weird one. The following matches, as it should:

re: ^(a(?(7)\7))()()()()()(b)(?1)$
str: "abab"

But if you add an empty backreference, it starts to fail:

re: ^(a(?(8)\8))()()()()()()(b)(?1)$
str: "abab"

It appears that (?(8)) correctly succeeds in the subroutine call, as though it
were set, but \8 fails, as though it were unset.

Apologies if this is an old issue fixed in PCRE2. I don't have the means to
test that just yet! Waiting for it to be implemented on regex101.com

All the best,
John Tattarakis

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