An easy cleanup:
def extract_field(data, elem)
  if data =~ /<#{name}>([^\<]+)<\/#{name}>/i
    return $1
  end
end

 rfcproto = extract_field(response, 'rfcproto')