Block oriented search and replace across multiple files.

Kenneth Loafman kenneth at loafman.com
Sat Nov 28 12:33:11 UTC 2009


Ray Parrish wrote:
> Hello,
> 
> I am searching for a programmer's editor that does block oriented 
> search, and replace across multiple files. I have found regexxer, but it 
> only changes single lines at a time, and will not match a multi-line 
> search term.
> 
> What I want to be able to do is replace several lines of text with 
> several other lines of text in all open files all at one go.
> 
> Does anyone know of an editor that does this?

Emacs and Eclipse both support multi-line regex expressions.  I'm rusty
on Emacs, but with Eclipse just use "(?ms)StartPhrase.*StopPhrase" to
match the paragraph, then replace with whatever you want.  Add anchors
as needed.

...Ken




More information about the ubuntu-users mailing list