[pcre-dev] [Bug 1759] New: pcreposix: REG_NOSUB incompatible…

Top Page
Delete this message
Author: admin
Date:  
To: pcre-dev
New-Topics: [pcre-dev] [Bug 1759] pcreposix: REG_NOSUB incompatible with POSIX regex
Subject: [pcre-dev] [Bug 1759] New: pcreposix: REG_NOSUB incompatible with POSIX regex
https://bugs.exim.org/show_bug.cgi?id=1759

            Bug ID: 1759
           Summary: pcreposix: REG_NOSUB incompatible with POSIX regex
           Product: PCRE
           Version: 8.31
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
          Assignee: ph10@???
          Reporter: simmo.saan@???
                CC: pcre-dev@???


When moving from POSIX regex to PCRE via pcreposix in WeeChat I encountered the
following problem when trying to match "aa" to "^(.)\1$":
* in POSIX regex the pattern compiles when REG_EXTENDED and REG_NOSUB flags are
set with regcomp;
* in pcreposix the pattern does not compile with REG_NOSUB flag set.

I understand that PCRE disables automatic capture numbering when the flag is
set but that causes incompatible behavior with POSIX ERE where the described
pattern with a backreference is completely allowed. This difference is not
really obvious at a higher level because not wanting submatches at regexec
shouldn't mean patterns with backreferences shouldn't compile.

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