From: Dan Schmidt Date: 2002-10-22T13:56:15+09:00 Subject: Re: Perl multiple match RE in Ruby? 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. You're in luck: $_[0].scan( /([-.]|\d+|[^-.\d]+)/ ) You can also pass String#scan a block to execute on each match. See http://www.rubycentral.com/book/ref_c_string.html#String.scan for details. Dan -- http://www.dfan.org