From: Clemens Hintze Date: 2002-03-23T05:08:21+09:00 Subject: Re: Sub-String In <9FLm8.16$%g7.14159041@newssvr13.news.prodigy.com> "Sean O'Dell" writes: >What's a good way to grab a sub-string from a string? With string That depends on what you want to do. (...) >Here's an example: > "/home/fred/file.ext".substr(11) => "file.ext" The stright ahead way would be, I guess: "/home/fred/file.ext"[11..-1] #-> "file.ext" But for solving the problem you have shown us above (getting a filename from a path): File.basename("/home/fred/file.ext") #-> "file.ext" HTH, \cle