[pcre-dev] [Bug 2433] New: A regression by 1133 commit: A l…

Top Page
Delete this message
Author: admin
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 2433] New: A regression by 1133 commit: A lookbehind after a condition does not match
https://bugs.exim.org/show_bug.cgi?id=2433

            Bug ID: 2433
           Summary: A regression by 1133 commit: A lookbehind after a
                    condition does not match
           Product: PCRE
           Version: N/A
          Hardware: x86
               URL: https://bugzilla.redhat.com/show_bug.cgi?id=1743863
                OS: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
          Assignee: ph10@???
          Reporter: ppisar@???
                CC: pcre-dev@???


A Fedora user noticed that this pcre2 commit 1133:

commit d70442f2c962ca816b8d03504a07e618c271a9fe
Author: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
Date: Tue Jul 16 15:06:21 2019 +0000

    Fix lookbehind within lookahead within lookbehind misbehaviour bug.



    git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1133
6239d852-aaf2-0410-a92c-79f79f948069


causes Julia test suite to fail. I reduced the test to this:

$ printf '%s\n%s\n' '/^(?<A>a)(?(<A>)b)((?<=b).*)$/' 'abc' | ./pcre2test
PCRE2 version 10.34-RC1 2019-04-22
/^(?<A>a)(?(<A>)b)((?<=b).*)$/
abc
No match

A commit before works as expected:

$ printf '%s\n%s\n' '/^(?<A>a)(?(<A>)b)((?<=b).*)$/' 'abc' | ./pcre2test
PCRE2 version 10.34-RC1 2019-04-22
/^(?<A>a)(?(<A>)b)((?<=b).*)$/
abc
0: abc
1: a
2: c

It looks like a lookbehind after a condition is the culprit. Because these
expressions work:

/^(?<A>a)b((?<=b).*)$/
abc
0: abc
1: a
2: c

/^(?<A>a)(?(<A>)b)(.*)$/
abc
0: abc
1: a
2: c

A full expression from the Julia test can bee seen at
<https://bugzilla.redhat.com/show_bug.cgi?id=1743863>.

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