REGEXP_REPLACE in post_contet

Ok, if someone in the future also needs something like this,
I found the solution after some time of playing with regular expressions.

This worked for me:

UPDATE `wp_posts` SET `post_content` = REGEXP_REPLACE(`post_content`, 'https:\/\/www\.example\.com\/magazin\/(.*?)\/">', 'https://www.example.com/magazin/\\1">');

Example in action can be seen here:
https://regex101.com/r/3ZPylJ/1

Hope it helps!

Smile to all 🙂