From: "Olivier D." Date: 2004-08-05T11:11:28+09:00 Subject: Re: open files in other directories On 2004-08-05, Matthew Margolis wrote: > Mehr, Assaph (Assaph) wrote: > >>> campershash["#{textfilename.chop.chop.chop.chop}"] = >> >>Try textfilename[0..-5] for a fixed size slice. >> Or maybe a regular expression if the size of the extension is unknown: filename = "website-20040812.html" name = $1 if filename =~ /^(.+)\.[^.]+$/