Subject: Re: bug#10754: define-minor-mode and doc of derived mode

From: Noam Postavsky <[email-masked]>
Date: Fri, 29 Jun 2018 11:12:40 -0400

On 29 June 2018 at 10:52, John Shahid <[email-masked]> wrote:

>     (replace-regexp-in-string "\\(\n\n\\).*\\'"

The trick is that "." matches anything but a newline, using (.\\|\n\\)
instead works as expected:

(replace-regexp-in-string "\\(\n\n\\)\\(?:.\\|\n\\)*\\'"
              "\n\ndoc\\1"
              "foo\n\nbar\n\nbaz"
              nil
              nil
              1)