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

Please add a string function to count how often some character is in a string

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: OTHER
    • Labels:
      None

      Description

      In Wikipedia we often have article names with parenthesis like https://en.wikipedia.org/wiki/Walker_(surname) and it would be nice to have some function which enables me to find those, where the number of opening parenthesis matches the numer of closing ones.

      Current solution is a query like
      ( pl_title LIKE "%)%)%" AND pl_title NOT LIKE "%(%(%" )
      OR
      ( pl_title LIKE "%)%" AND pl_title NOT LIKE "%(%" )
      ...

      It would be a lot easier to write a query like
      CHAR_COUNT(pl_title, '(') = CHAR_COUNT(pl_title, ')')

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            Wurgl Wolfgang Formann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration