From: Peter Bailey Date: 2008-01-08T04:38:48+09:00 Subject: Re: Where do I put the ".to_f" ? Todd Benson wrote: > On Jan 7, 2008 12:25 PM, Peter Bailey wrote: >> > >> > 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 Yes. Thanks. It's just that I never knew that String#[] even existed. It's a great tool. -- Posted via http://www.ruby-forum.com/.