From: Harry Kakueki Date: 2007-05-17T13:22:16+09:00 Subject: Re: Can't get subgroup of regex to repeat with +... what the ? On 5/17/07, Harry Kakueki wrote: > On 5/17/07, Jon wrote: > > > > Example Strings: > > ===== > > A=" " > > B=" " > > C=" " > > ===== > > Unless you really want to write one regular expression for it all, you > could do something like this. > > Split on spaces, then on '=' . Then process however you want. > > r = B.strip.split(/\s/) > p r > r[1..-1].each {|f| p f.split("=")} > > Harry > Sorry for the double post. This is a little cleaner and easier, I think. C.strip.delete("<>").split(/\s/).each {|f| p f.split("=")} Harry -- A Look into Japanese Ruby List in English http://www.kakueki.com/