I am trying to update a column in MariaDB using regexp_replace. I've tested this out in this fiddle and it works just fine, however when I update and export the table, it seems that the match is replaced by the literal regex pattern - href="#h_$1" .
This is my query:
UPDATE blog_posts
SET blog_content = regexp_replace(blog_content, 'href="[^#"]+#h_(.+)"', 'href="#h_$1"');
Did anyone encounter this before and if yes how can I solve it?
regexp_replace().