RegEx MariaDB Multiline – Exchange Stack Database Administrators

I run a SQL query in MariaDB under PHPMyAdmin as follows:

select REGEXP_REPLACE (post_content, & # 39; (? m)[.rn]*& # 39; & # 39; & # 39;) of wp_posts where ID = 318

I'm trying to remove the script of a hacker from a WordPress publication, everything between the noindex start tag and the noindex end tag, but the noindex end tag is on the second line . I want to test RegEx first with a query, then run an update later. I can not make it work unless I limit the changes to a line.

The post_content column is defined as LongText.

I     was trying to accomplish etc ... etc ...

The same regular expression works well in NotePad ++ when I check the "Multiline" option.

Version: 10.1.38-MariaDB