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

REGEXP not properly handling \s*

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.3.9
    • N/A
    • Server
    • None

    Description

      The string

      {"fooa": "2", "foob": "2","fooc":"1"}
      

      is stored in a column named "test". The statement

      select test from table1 WHERE test REGEXP '(\s*\"[^\"]+\"\s*\:\s*\"\s*2\s*\"\s*,?)';
      

      does not match the string, and no result set is returned.

      However, removing the FIRST blank space

      {"fooa":"2", "foob": "2","fooc":"1"}
      

      DOES allow the match to occur.

      Checking against other PCRE-compliant engines (eg. Regex101.com) show that BOTH strings should match, yet for some reason, the MariaDB regex engine is getting tripped up on first space. If I'm missing something regarding notation, please do let me know.

      Thanks

      Attachments

        Activity

          People

            Unassigned Unassigned
            coder5 Bob Smith
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.