java 获取文件名(无后缀名)

File file=new File("d:/a/aa/test.1.txt");
  System.out.println(file.getName().replaceAll("[.][^.]+$", ""));

原文地址:https://www.cnblogs.com/growup/p/1971546.html