From: Paul Mena Date: 2012-12-21T22:17:15+09:00 Subject: Re: trying to strip characters from a line The code is the very first post in this thread, but I'll repeat some of it here: n_rows.times do begin file = File.open("archive.html", "a") line = rs.fetch_row.to_s line.gsub /\[\]\"\,/, '' file.write(line) file.puts "
" end end The code is processing rows from a MySQL table as lines of text, one at a time. The desired output would look something like this: blah blah blah
meh
foo bar
Feb-12-2012
Instead it looks like this: ["blah blah blah
meh
foo bar
", "Feb-12-2012
"] -- Posted via http://www.ruby-forum.com/.