Ref:How to get file name without the extension?
Normally,there are two ways to implements this:use the library or the regular expression.
here I use the regular expression.
1 String s = "a.xml.ac.df.ef"; 2 String result = s.replaceFirst("[.][^.]+$", ""); 3 System.out.println(result); //outputs:a.xml.ac.df
Get file name without extension.,布布扣,bubuko.com
Get file name without extension.
原文:http://www.cnblogs.com/listened/p/3576275.html