From: fedzor Date: 2008-04-18T23:34:47+09:00 Subject: Re: How to substitute tabs into single spaces for a String On Apr 18, 2008, at 9:32 AM, Peter Loftus wrote: > val = " hello ".sub(/\t/, ' ') > puts val > > Cant covert tabbed spaces into regular single spaces > Anyone have any ideas? Use gsub instead of sub! sub only changes the first occurence, gsub chances all. val = " AWESOME ".gsub(/\t/, ' ') puts val --------------------------------------------| If you're not living on the edge, then you're just wasting space.