On Jan 7, 2008 12:25 PM, Peter Bailey <pbailey / bna.com> wrote: > Robert Klemme wrote: > > On 07.01.2008 19:06, Peter Bailey wrote: > >> > >> I get this from Ruby: > >> sizer.rb:10: undefined method `to_f' for [["5100"]]:Array > >> (NoMethodError) > > > > Your error is in using #scan (see the docs for details). > > > > This works better > > > > width = info[/Image Width: ([0-9]{1,5})/, 1].to_f > > ... > > > > Cheers > > > > robert > > Thank you very much. Yes, that works perfectly. That whole square > bracket thing you use there is new to me. When you say "see the docs," > what should I look for? For "String#scan" or for Regex. . . .? You want to look at String#[] Todd