gamecreature in Hacking | 9 July, 2014 Ruby undocument File.basename trick Just stumbled upon the following trick to get the basename without an extension in Ruby: (I didn't know you could use ".*" to remove any extension). File.basename( "filename/sample-filename.html", ".*" ) => "sample-filename" gamecreature Published 9 July, 2014