From: Jon Fi Date: 2007-05-17T05:59:22+09:00 Subject: Re: Can't get subgroup of regex to repeat with +... what the Wolfgang N叩dasi-donner wrote: > Jon wrote: >> B=" " >> ... >> /<(\w+?)(?:\s(\w+)=(\w+))+>/ >> ... >> md[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/.