On 2007-01-12 17:05:34 +0100, Bira <u.alberton / gmail.com> said: > On 1/12/07, Josselin <josselin / wanadoo.fr> wrote: >> I wrote the following ruby statements.. I get the result I need , I >> tried to DRY it for 2 hours without being successfull , >> >> d = d.gsub(/\r\n/,' ') # get rid of carriage return >> d = d.gsub(/;/,' ') # replace column by space >> d = d.gsub(/,/,' ') # replace comma by space >> a = d.split(' ') # split into component , space as divider >> >> tfyl > > How about a = d.gsub(/\r\n|;|,/,' ').split(' ') ? thanks .. did not notice that I could use the '|' inside the gsub..... get stuck to [. and...]