class String

def remove!(*patterns)

str # => "foo "
str.remove!(" test", /bar/) # => "foo "
str = "foo bar test"
Alters the string by removing all occurrences of the patterns.
def remove!(*patterns)
  patterns.each do |pattern|
    gsub! pattern, ""
  end
  self
end