--00163662e5e4f251fe04618d596e
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On Wed, Jan 28, 2009 at 5:00 PM, Mickael Faivre-Macon <faivrem / gmail.com>wrote:

> And is there a way to keep previous matching ?
> Mickael.
>
>
> Andrew Timberlake wrote:
> > On Wed, Jan 28, 2009 at 1:26 PM, Mickael Faivre-Macon
> > <faivrem / gmail.com>wrote:
> >
> >> 5: (2)
> >>
> >> My question is why ;5,7 is not matched ?
> >>
> >> Thanks,
> >> Mickael.
> >> --
> >> Posted via http://www.ruby-forum.com/.
> >>
> >>
> > Mickael
> >
> > Because it matches ;5,7 first and then overwrites $3,$4 & $5 with ;3,2
> > which
> > matches based on the '*'
> >
> > --
> > Andrew Timberlake
> > http://ramblingsonrails.com
> > http://www.linkedin.com/in/andrewtimberlake
> >
> > "I have never let my schooling interfere with my education" - Mark Twain
>
> --
> Posted via http://www.ruby-forum.com/.
>
>
What about tackling it from a completely different angle

s  5,1;5,7;3,2"
pairs  .split(';') #["5,1", "5,7", "3,2"]
pairs.each do |pair|
  pair.split(',') #["5", "1"] etc
end

-- 
Andrew Timberlake
http://ramblingsonrails.com
http://www.linkedin.com/in/andrewtimberlake

"I have never let my schooling interfere with my education" - Mark Twain

--00163662e5e4f251fe04618d596e--