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

REGEXP_REPLACE(): unexpected result

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3.23, 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
    • 10.4(EOL)
    • None
    • AMD64

    Description

      SELECT REGEXP_REPLACE( 
      'zdf_neo_HD_Monk20170218_184400.ts',
      '^_*(Pro(7_MAXX|Sieben)|kabel(1|_eins)|(SUPER_)?RTL(_Televivion|2|NITRO|plus)?|Das_(Erste|VIERTE)|(00[12]_)?KiKA|Eins(Festival|Extra|Plus)|zdf(_neo|\.kultur|info(kanal)?|dokukanal)?)(_HD)?_*',
      'XXX' );
      

      Maria-DB Result:
      zdf_neo_HD_Monk20170218_184400.ts

      Expected result (should replace 'zdf_neo_HD' by 'XXX'):
      XXXMonk20170218_184400.ts

      Omitting one part of the RegExp (e.g. '|kabel(1|_eins)' or '|Eins(Festival|Extra|Plus)') leads to correct results:

      SELECT REGEXP_REPLACE( 
      'zdf_neo_HD_Monk20170218_184400.ts',
      '^_*(Pro(7_MAXX|Sieben)|(SUPER_)?RTL(_Televivion|2|NITRO|plus)?|Das_(Erste|VIERTE)|(00[12]_)?KiKA|Eins(Festival|Extra|Plus)|zdf(_neo|\.kultur|info(kanal)?|dokukanal)?)(_HD)?_*',
      'XXX' );
      -> XXXMonk20170218_184400.ts
      
      

      SELECT REGEXP_REPLACE( 
      'zdf_neo_HD_Monk20170218_184400.ts',
      '^_*(Pro(7_MAXX|Sieben)|kabel(1|_eins)|(SUPER_)?RTL(_Televivion|2|NITRO|plus)?|Das_(Erste|VIERTE)|(00[12]_)?KiKA|zdf(_neo|\.kultur|info(kanal)?|dokukanal)?)(_HD)?_*',
      'XXX' );
      -> XXXMonk20170218_184400.ts
      
      

      Result is confirmed on versions 10.3.23 and 10.4.13

      Attachments

        Activity

          People

            bar Alexander Barkov
            munkbot Marc Muelller
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.