Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-6965

non-captured group \2 in regexp_replace

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.11
    • 10.0.15
    • OTHER

    Description

      select regexp_replace('1 foo and bar', '(\\d+) foo and (\\d+ )?bar', '\\1 this and \\2that')

      expected result: 1 this and that
      actual result: 1 this and 2that

      Attachments

        Activity

          julian.ladisch Julian Ladisch created issue -
          elenst Elena Stepanova made changes -
          Field Original Value New Value
          Description select regexp_replace('1 foo and bar', '(\\d+) foo and (\\d+ )?bar', '\\1 this and \\2that')

          expected result: 1 this and that
          actual result: 1 this and 2that
          {code:sql}
          select regexp_replace('1 foo and bar', '(\\d+) foo and (\\d+ )?bar', '\\1 this and \\2that')
          {code}

          expected result: 1 this and that
          actual result: 1 this and 2that
          elenst Elena Stepanova made changes -
          Assignee Alexander Barkov [ bar ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.0 [ 16000 ]
          bar Alexander Barkov made changes -
          Fix Version/s 10.0.15 [ 17300 ]
          Fix Version/s 10.0 [ 16000 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 56718 ] MariaDB v3 [ 65270 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 65270 ] MariaDB v4 [ 148369 ]

          People

            bar Alexander Barkov
            julian.ladisch Julian Ladisch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.