From: Carlos Date: 2003-04-30T00:07:18+09:00 Subject: Re: Regexp > With Perl, something like > while (/regexp/g) { > #do smt with $1 > } > works. > > How can I do that with Ruby ? Maybe with string.scan(/regexp/) { |match| # do something with match } .