From: Peter Marks Date: 2007-08-28T09:55:09+09:00 Subject: Conducting Regular Expressions on a text file I'm trying to find and replacace the string "placeholder" in a text file. Any idea how I could get the following code to work? file = File.open('/folder/template.txt', 'r+') file.gsub!(/placeholder/, "word") Thanks, Peter -- Posted via http://www.ruby-forum.com/.