I would write like

result = q.gsub(/<[^>]*>/, "")

Thanks