From: Justin To Date: 2008-06-11T03:34:59+09:00 Subject: Re: replacing a character in a string Hey, I'm a newbie, but here's one solution: cal_name = "testing_this_out" match = '_' while(cal_name.include?(match)) cal_name.sub!(match, ' ') end puts cal_name #=> testing this out Your solution prints "testing this_out" with only the first underscore substituted. String#sub only replaces the first occurence of the pattern. Refer to http://www.ruby-doc.org/core/classes/String.html#M000748 for some information on the String object's methods. Hope this helps!! =D -- Posted via http://www.ruby-forum.com/.