From: "Jan E." Date: 2012-04-12T12:08:31+09:00 Subject: Re: Regular expression help Hi, You don't need a regular expression. If the file extension is always the same (.int-APACHE.gz), you can use File#basename: puts File.basename('c:/Documents and Settings/Administrator/Desktop/version3/test_files/apserver2.int-APACHE.gz', '.int-APACHE.gz') This returns the filename without the specified extension. -- Posted via http://www.ruby-forum.com/.