I know how to use C-q C-j or C-o in the query string when doing a query-replace or a query-replace-regex, and that works great.
However, in find-name-dired, after I've toggled to select the pertinent files in the *Find* buffer, if I then type Q and try to use either of those (or several other experiments that also don't work) as the query string, no strings ever match my query, even though I know they're there.
This could be a bug. But, since this behavior has been the same for a couple decades, it's likely there's something I'm missing. (Before, I'd always do the find-with-newline/replace file-by-file, but today I need to change too many files for that to be practical.)
Alternatively, if anybody knows of a better way in Emacs to perform a regex replace across many files at once than find-name-dired, I'm all ears ...
Note that the documentation of
dired-do-find-regexp-and-replacewhich is invoked by Q ends withgrepcan't match multiline patterns.