M-x find-name-dired: you will be prompted for a root directory and a filename pattern.- Press
tto “toggle mark” for all files found. - Press
Qfor “Query-Replace in Files…”: you will be prompted for query/substitution regexps. - Proceed as with
query-replace-regexp:SPACEto replace and move to next match,nto skip a match, etc. - Press
C-x sto save buffers. (You can then pressyfor yes,nfor no, or!for yes for all)