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

Allow for uses of $1, $2 within REGEXP_REPLACE

    XMLWordPrintable

Details

    • New Feature
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      Hello,

      In MySQL, it's possible to do the following query:

      SELECT REGEXP_REPLACE("abc", "a(b)", "$1");
      

      which will give the result of

      bc

      In MariaDB, this similarly can be done with two backslashes:

      SELECT REGEXP_REPLACE("abc", "a(b)", "\\1");
      

      However, would it be possible to allow REGEXP_REPLACE to also use the $ syntax so that there's syntax compatibility between the two database engines?

      Thanks.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              SeventhCycle Mark El-Wakil
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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