class String

def remove(*patterns)

str # => "foo bar test"
str.remove(" test", /bar/) # => "foo "
str.remove(" test") # => "foo bar"
str = "foo bar test"
Returns a new string with all occurrences of the patterns removed.
def remove(*patterns)
  dup.remove!(*patterns)
end