All pastes #949983 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-03-20 07:00 UTC
rendered paste body
  def remove_tag(s, tag)
    return s.to_s.gsub("<#{tag}\b[^>]*>(.*?)</#{tag}>", '\1')
  end
# I want to be able to:
# remove_tag("<input name="something">hrm...</input>", "input") => "hrm..."