From: James Gray Date: 2009-06-22T04:08:14+09:00 Subject: Re: if column header contain regexp, delete column On Jun 21, 2009, at 10:54 AM, Paul Shapiro wrote: > I need to see if a csv column header matches a pattern (see columns > 2/3 > below...S31 and S32) then delete the entire column. I've tried using: > /(S[0-9]+\s\b)/ > but i don't think the regexp is the problem. My script is using bother > the rio and fastercsv gems. The fastercsv documentation has been very > difficult for me to figure out (I'm new to ruby). Thanks. Paul, we need to improve your question asking skills a bit. :) It's hard for us to help when we have to read through a lot of prose and even more code to understand the issue you are facing. You'll get a lot better responses, and quicker, if you try to simplify your questions down for us. "Here are the five lines I'm trying to use to delete a column of CSV. Can you tell me why it's failing?" for example. Basically though, the steps are almost identical to what I gave you in this message: http://groups.google.com/group/comp.lang.ruby/msg/c9f4c7b71465b6af Just copy the data, leaving out the column you don't want. I hope that helps. James Edward Gray II