From: Bruce Williams Date: 2002-10-26T22:30:59+09:00 Subject: Re: How to return multiple matches in Regexp? On Friday 25 October 2002 10:46 pm, Carl Youngblood wrote: > I'm used to the perl modifier /.../g that makes sure that a regexp > matches as many occurrences as possible. How do you do this in Ruby? > > Thanks, > Carl Youngblood aString.scan(aRegexp) -> anArray ... may be what you're looking for. refer to: http://www.rubycentral.com/book/ref_c_string.html#String.scan