Jon Fi wrote:
> Ah ok. So how can I get it to repeat without overwriting the existing 
> values for the group? Or is there a better way to do this?

I would do it somehow like:

========== code ==========
texts = [ "<orderMsg biz=0>",
          "<orderMsg type=7 size=0>",
          "<orderMsg type=7 size=0 biz=1>"]

texts.each do |txt|
  if (md=txt.match(/<(\w+?)((?:\s\w+=\w+)+)>/))
    puts "\nkey '#{md[1]}' found"
    md[2].scan(/\s(\w+)=(\w+)/) do |k, v|
      puts "  parameter '#{k}' has value '#{v}'"
    end
  else
    puts "+++ no match for '#{txt}'"
  end
end
========= result =========
key 'orderMsg' found
  parameter 'biz' has value '0'

key 'orderMsg' found
  parameter 'type' has value '7'
  parameter 'size' has value '0'

key 'orderMsg' found
  parameter 'type' has value '7'
  parameter 'size' has value '0'
  parameter 'biz' has value '1'
========== end ===========

Wolfgang NĂ¡dasi-Donner

-- 
Posted via http://www.ruby-forum.com/.