On Wed, Nov 14, 2007 at 12:03:42AM +0900, Jigar Gosar wrote:
> my code has reduced to
> 
> Dir["C:/pde/cvshome/trunk/OBox/**/src/core/**/*.java"].each{|f|
>   file = f.gsub(/.*\/src\/core\//,"")
>   file = file.gsub("/",".")
>   file = file.gsub(/.java$/,"")
>   puts file
> }
> 
> Any way to shorten it further??

If you want only the name of the file, use

puts File.basename(f, ".java")

Best,

-- 
Damien MERENNE   <dam / cosinux.org>
http://blog.cosinux.org/