Replace in multiple files - graphical tool for Linux

Lately Kate (if you use KDE) can do it, but in a very tricky way. Go to "Edit>Search in Files", and choose the folder within which your files exist.

The trick is that only after the search results appear, you will find a text box and a button called "Replace checked". This button will do what you want.


I think regexxer is exactly what you're looking for:

Regexxer

regexxer is a nifty GUI search/replace tool featuring Perl-style regular expressions. If you need project-wide substitution and you’re tired of hacking sed command lines together, then you should definitely give it a try.

See also the screenshot, looks a lot like what you're describing:

screenshot


Emacs + dired + query-replace-regexp

For complete recipe follow this link (it's rather long, covering all possible alternatives),


jEdit does exactly what you need. It is written in Java and works well in Linux, Windows and OS X (probably other operating systems also).