From: Matt Armstrong Date: 2002-12-13T05:29:36+09:00 Subject: Re: [RCR] Global Regexp Match Mechanism (//g) dblack@candle.superlink.net writes: > Hi -- > > On Fri, 13 Dec 2002, Austin Ziegler wrote: > >> I played around with the necessary mechanisms to emulate //g Regexp >> behaviour in Ruby, but I'm not too happy about how much extra work I >> would have to do. > > What do you consider "extra"? :-) Usually I just use String#scan > for that. In addition to Austin's reasons, String#scan makes lots of little intermediate strings, which you don't necessarily need. So there is an efficiency argument too.