String fileNameStr = "/sdcard/Pictures/1.jpg" String fileName = fileNameStr.replaceAll(".+/(.+\\..*)","$1"); 返回: 1.jpg