def remove_tag(s, tag) return s.to_s.gsub("<#{tag}\b[^>]*>(.*?)", '\1') end # I want to be able to: # remove_tag("hrm...", "input") => "hrm..."