Ideas how to search & replace post_content when string contains a newline?

that was easy to do directly in sql:

UPDATE wp_posts 
SET post_content = replace(post_content,'</div>\r\n\r\n<div id="postbottom">','</div><div id="postbottom">');