From: MenTaLguY Date: 2007-12-15T03:22:32+09:00 Subject: Re: simple way to turn "foo and bar" to "+foo +bar" On Sat, 15 Dec 2007 03:19:22 +0900, Rolando Abarca wrote: >> Can anyone help with an elegant solution? > > "foo and bar and baz".split(/\s+and\s+/i).map{|s| "+#{s}"}.join(' ') I think this one is best. -mental