mariadb multiline regexp_replace
This can be solved with the dotall-modifier (?s):

 select regexp_replace(entry, '(?s)LINE2.*LINE4\r\n', '') from test


More modifiers can be found here: https://mariadb.com/kb/en/pcre/#option-setting