I am trying to use
query-replace-regexp to find and replace some blocks of text across multiple HTML files. (Just what is explained here in the Emacs Manual.)
query-replace-regexp fails to match anything containing a newline.
For example, I want to find all files containing the following:
It will find
<div class="copyright"> by itself, but not when concatenated with the newline as above.
I've tried coding the newline like so:
<div class="copyright">^J(inserted with
The first fails with no matches. The second and third cause the minibuffer to complain that
"\n" don't match newlines in this function.
I know the newlines in my files are line feeds and not carriage returns (as documented here in Xah Emacs), but I've also tried coding my regular expressions with
\r for good measure. No matches.
How can I get
query-replace-regexp to match a newline?