From: "Wolfgang Nádasi-donner" Date: 2007-05-17T05:57:13+09:00 Subject: Re: Can't get subgroup of regex to repeat with +... what the 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 -- Posted via http://www.ruby-forum.com/.