From: Hans Mackowiak Date: 2012-12-20T15:14:03+09:00 Subject: Re: Perl to Ruby: regex captures to assignment. how about this? use the magic of =~ to assign the local variables w, n, d = 0, frac_str, 1 unless /(?:(?\S+) )*?(?\S+)\/(?\S+)/ =~ frac_str -- Posted via http://www.ruby-forum.com/.