Aryk Grosz wrote: > is there any shortcut for removing a string of characters from text, > like gsub("word",""). I looked into String#delete but it will delete all > the characters in the entire word. str["word"] = "" str[/word/] = "" but these only do the first instance. If you find yourself writing str.gsub! /word/, '' repeatedly, to the point where it is tiresome, then factor it out yourself, depending on exactly what your needs are. e.g. class String def remove!(str) gsub!(str, '') end def remove(str) res = dup res.remove!(str) res end end -- Posted via http://www.ruby-forum.com/.