Uploaded image for project: 'named-regexp'
  1. named-regexp
  2. REGEX-6

Capture groups ignored if preceded by literal slash

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.1.8
    • Labels:
      None

      Description

      These two patterns were both ignored because the left parenthesis in both cases were preceded by a slash (which is usually the pattern of an escaped parenthesis).

      • \\\(?<not-named-group>patt)
      • \\(?<named-group>patt)

      But the second pattern is actually a valid/non-escaped named capture group because the slash is itself preceded by another slash (making it a literal).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              tony19 Anthony Trinh [Administrator] added a comment - - edited

              A literal-slash and an escape-slash are now distinguished by counting the number of consecutive slashes immediately preceding the parenthesis. An even number indicates that the slashes are literals while an odd number indicates the last slash is an escape.

              Fixed in commit 2b44a055b9e18bfa25bf7d961b09878e7de7b415.

              Show
              tony19 Anthony Trinh [Administrator] added a comment - - edited A literal-slash and an escape-slash are now distinguished by counting the number of consecutive slashes immediately preceding the parenthesis. An even number indicates that the slashes are literals while an odd number indicates the last slash is an escape. Fixed in commit 2b44a055b9e18bfa25bf7d961b09878e7de7b415 .

                People

                • Assignee:
                  tony19 Anthony Trinh [Administrator]
                  Reporter:
                  tony19 Anthony Trinh [Administrator]
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 day
                    1d

                      Development

                        Who's Looking?