From: Charles Mills Date: 2004-12-17T06:37:17+09:00 Subject: Re: string to (valid) filename If you don't like regexp you could use String#tr and String#delete. $ ruby -e 'puts "Animals: Fox, Wolf, and Bear".delete(",:").tr(" ","_")' Animals_Fox_Wolf_and_Bear $ ruby -e 'puts "Animals: Fox, Wolf, and Bear".downcase.delete(",:").tr(" ","_")' animals_fox_wolf_and_bear You'll probably have to put more characters in #delete's argument string. Learning about regexps is worth the effort. -Charlie