[pcre-dev] [Bug 1873] New: Groups in conditionals are partia…

Page principale
Supprimer ce message
Auteur: admin
Date:  
À: pcre-dev
Nouveaux-sujets: [pcre-dev] [Bug 1873] Groups in conditionals are partially matched, bug or feature?
Sujet: [pcre-dev] [Bug 1873] New: Groups in conditionals are partially matched, bug or feature?
https://bugs.exim.org/show_bug.cgi?id=1873

            Bug ID: 1873
           Summary: Groups in conditionals are partially matched, bug or
                    feature?
           Product: PCRE
           Version: 8.36
          Hardware: x86
                OS: All
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
          Assignee: ph10@???
          Reporter: firas.dib@???
                CC: pcre-dev@???


If you have a regex with a group, say `(?<REASON>...)` and then use a
conditional, `(?(R)...)`, it tries to match the group `REASON` and not do a
full pattern recursive match.

>From the documentation:

       If the condition is the string (R), and there is no subpattern with the
       name  R, the condition is true if a recursive call to the whole pattern
       or any subpattern has been made.


Is this a bug or a "feature"?

Also see https://github.com/firasdib/Regex101/issues/532

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