From: 7stud -- Date: 2012-10-15T11:58:50+09:00 Subject: Re: best way to extract data from a string? str = 'file name_Width34.56_Height45.97_.jpg' name, width, height, ext = str.split('_') name << ext width = width[5..-1] height = height[6..-1] puts name, width, height --output:-- file name.jpg 34.56 45.97 > so we created a photoshop script that automatically creates the small > version jpgs and inserts the original width height data to the name of > the file. Whoever wrote that script should be fired. -- Posted via http://www.ruby-forum.com/.