I am wondering if I am going about splitting a string on a . the right way? My code is:
.
String[] fn = filename.split(\".\"); return fn[0];
Using ApacheCommons it's simplest:
File file = ... FilenameUtils.getBaseName(file.getName());
Note, it also extracts a filename from full path.