From: James Gray Date: 2009-06-23T01:53:44+09:00 Subject: Re: if column header contain regexp, delete column On Jun 22, 2009, at 8:30 AM, Paul Shapiro wrote: >> :s31_which_best_describes_how_you_answered_the_online_reading_comprehension_quiz >> >> Thus the Regexp needs to be adapted accordingly. Here's one you >> might >> try: >> >> /\AS\d+/i >> >> Hope that helps. >> >> James Edward Gray II > > I'm guessing it was incorrect to assume that the delete statement > would > write out to the file? How would I do that. It prints correctly. Yes, the delete() call deletes a column out of the in-memory table data structure. If you want to write the result to a file, you do it the same way you wrote it to the screen: open("new_data.csv", "w") do |csv| # create a file csv.puts table # write to that end Hope that helps. James Edward Gray II