From: Brian Candler Date: 2012-12-22T00:53:10+09:00 Subject: Re: Subtracting strings Another way, if you only want to remove the first instance: >> myunwantedword = "Hello" => "Hello" >> myphrase = "Hello world" => "Hello world" >> output = myphrase.dup => "Hello world" >> output[myunwantedword] = "" => "" >> output => " world" >> Or you can use slice! instead of []= >> output.slice!(myunwantedword) => "Hello" >> output => " world" -- Posted via http://www.ruby-forum.com/.