
Visual-regexp for Emacs is like `replace-regexp`, but with live visual feedback directly in the buffer.
While constructing the regexp in the minibuffer, you get live visual feedback for the matches, including group matches. While constructing the replacement in the minibuffer, you get live visual feedback for the replacements.
It can be used to replace all matches in one go (like `replace-regexp`), or a decision can be made on each match (like `query-replace-regexp`).