From: Hugh Sasse Staff Elec Eng Date: 2000-12-18T21:43:37+09:00 Subject: [ruby-talk:7568] Re: Ruby performance question On Mon, 18 Dec 2000, ts wrote: > >>>>> "H" == Hugh Sasse Staff Elec Eng writes: > > H> What about scan? I cannot get this to work, but: > > If you want to use scan() you must not use \A(?:)+\Z otherwise you have > only the last match "keyx=valuex" > > H> while line = file.readline > H> p line.scan(/\A(?:([^=,]*)=([^=,]*),?)+\Z/) > > p line.chomp!.scan(/([^=,]*)=([^=,]*),?/) I added those because I only seemed to get the last value anyway.:-) > > H> end > > > Guy Decoux > Hugh