From: Andrew Johnson Date: 2006-04-12T03:31:34+09:00 Subject: Re: regex flags Tom Allison wrote: > I frequently use a perl approach of > > while ($arg =~ /(string_thing)/igsm) { > # use $1 here > } > to pick out chunks of a string as an iteration through the string. > This would require a 'g' without the 's'. > > No chance? Use String#scan: arg.scan(/pattern/im) do |it| # work on it here end andrew -- Posted via http://www.ruby-forum.com/.