1. 只保留 文件名
// E:/234/asdfa\abc.html -> abc.html 只保留文件名
// spring boot 下载文件时,要加上 @ResponseBody
//S+.[a-zA-Z0-9]+$
String s = "E:/234/asdfa\abc.html".replaceAll("[\s\S]+(?<=[/|\\])", "");
1. 只保留 文件名
// E:/234/asdfa\abc.html -> abc.html 只保留文件名
// spring boot 下载文件时,要加上 @ResponseBody
//S+.[a-zA-Z0-9]+$
String s = "E:/234/asdfa\abc.html".replaceAll("[\s\S]+(?<=[/|\\])", "");