From: Bertram Scharpf Date: 2007-10-23T20:34:33+09:00 Subject: Re: regex replace on a file Hi, Am Dienstag, 23. Okt 2007, 16:50:04 +0900 schrieb eggie5: > I want to do a simple regex replace on a file. I want to replace this > multiline match As far as I see for multilines the -i option doesn't work. You could do something like whole = File.read "fname" whole.gsub! /.../m, "..." File.open "fname.mod" do |f| f.write whole end Sorry, but I suppose the best tool for this task is Vim. Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de