From: Stephen Smith <4fires@...> Date: 2007-03-30T16:43:02+09:00 Subject: Re: text processing ------=_Part_76714_27769392.1175240579557 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Nice. You just made my month. Thank you Harry. Thank you Gary. Freekin' elegant. Steve On 3/29/07, Harry wrote: > > On 3/30/07, Gary Wright wrote: > > > > On Mar 30, 2007, at 1:25 AM, Harry wrote: > > > x =~ /(...)(.)(....)/ #grabs 3 characters, then 1, then 4 > > > mydata << $1 + "," + $2 + "," + $3 + "\n" > > > > mydata << /(...)(.)(....)/.match(x).captures.join(',') << "\n" > > > > Gary Wright > > > > 'captures' is new to me. > Thanks. > > Harry > > -- > > http://www.kakueki.com/ruby/list.html > Japanese Ruby List Subjects in English > > ------=_Part_76714_27769392.1175240579557--