From: Bill Kelly Date: 2001-10-09T17:23:41+09:00 Subject: [ruby-talk:22286] ruby idiom for m/regexp/g (i.e. 'gmatch') Hi all, What might be a common/kewl ruby idiom for Perl's while ("some str" =~ /regexp/g) { ... } Essentialy, sub : gsub :: match : ? :-) Hmm . . . I guess it could be: while (str =~ /regexp/) ... str = $' end Is there a better way? Thanks, Bill