From: WATANABE Hirofumi Date: 2002-10-22T12:52:51+09:00 Subject: Re: Perl multiple match RE in Ruby? Hi, michael libby writes: > Have this in Perl, would prefer it in Ruby. > > my @A = ($_[0] =~ /([-.]|\d+|[^-.\d]+)/g); > > Need to take String and get Array of all successive matches against string. How about String#scan ? % ruby -e 'p "a b c".scan(/\w/)' ["a", "b", "c"] -- eban