From: Joel VanderWerf Date: 2002-08-07T13:35:55+09:00 Subject: Re: Very ineficient regular expression match Maur�cio wrote: > Hi, > > The following code is supposed to print multiple regular expression > matches on a given string: Why not use scan? "foo bar baz".scan(/\w\w\w/) { |str| puts str } # ==> foo # bar # baz