From: Todd Benson Date: 2007-07-10T12:33:44+09:00 Subject: Re: Simple string operation On 7/9/07, 12 34 wrote: > seqNo = > File.basename("/Volumes/MINOLTA1/DCIM/100MLT16/PICT0004.MOV",".*")[-1,3].to_s > seqNo = "-" + seqNo+ ".xx.m" > puts "seqNo: #{seqNo} " # >> seqNo: -4.xx.m > > but I want it to be -004.xx.m. In other words I want the leading zeros. Maybe you want [-3,3] instead of [-1,3]? Todd