From: James Edward Gray II Date: 2006-04-27T03:29:39+09:00 Subject: Re: Stumped: How do I iterate over regular expression matches? On Apr 26, 2006, at 1:21 PM, Xeno Campanoli wrote: > I looked for an iterator, and there may be something, but I don't > recognize it. > I also tried: > while (x =~ /something/ ) > p $1 > > end > and it just printed out the same match over and over. Perl does > this very > nicely, but google and pickaxe are not helping me do it in Ruby. > Sorry if this > is obvious. You are looking for String#scan. Hope that helps. James Edward Gray II