Wolfgang Nádasi-donner wrote: > Jon wrote: >> B=" <orderMsg type=7 size=0>" >> ... >> /<(\w+?)(?:\s(\w+)=(\w+))+>/ >> ... >> md[0]=<orderMsg type=7 size=0> >> md[1]=orderMsg >> md[2]=size >> md[3]=0 > > It is correct. "(?:\s(\w+)=(\w+))+" matches two times, the last match is > with "size" and "0". The groups will be overwritten each time the "+" > will repeat the group. > > Wolfgang Nádasi-Donner 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? -- Posted via http://www.ruby-forum.com/.