I know I've been lazy not learning RegExp and gsub but I simply never use it except for this one time. I'll be importing .csv records and sometimes they'll be dirty with characters like ( # " ) and I'd like to change these to a space. I would be grateful for a simple example? Thank you, Kathleen
line.gsub!(/[#"]/,’ ')
the start / and end / define the regex. [#"] means 'match any one of the following: # and " ’
the gsub-bang (gsub!) method will change the contents of the line variable. If you’re more cautious do clean_line = line.gsub(…)