REGEXP_REPLACE does not replace a match with source string empty string (''), but REGEXP does match the empty string with a similar regex (.*). This seems inconsistent.
Example 1. REGEP_REPLACE with empty source string: does not replace
Example 2. REGEXP with empty source string: does match
Example 3: compare with perl:
I posted the question on Stack Overflow and was referred here.
I wasn't sure if this was really a bug, but it seems inconsistent - MariaDB uses https://mariadb.com/kb/en/pcre/, the perl command line as well as regex101 using perl do a replacement on the empty string.