From: Ryan Mckenzie Date: 2008-11-15T08:15:30+09:00 Subject: Re: Finding and writing to specified area in a text file Aldric Giacomoni wrote: > In all of my research online, the only way that I've found to do it is > to read the entire file, replace what you wanna replace, write to a new > file, then copy over the original one. I hope someone can show me a > better way. > > --Aldric Hi Aldric, I'm actually looking to replace some text/code in 3-4 places so i can't hardcode specific lines into the model because they could change. All of this needs to be done on a button click so the actual file is hidden from the user. I'm eventually wanting to add form input boxes and use them to replace the text/code areas. Thanks for your help. Please could you put up some of your code for me to study? -- Posted via http://www.ruby-forum.com/.