【发布时间】:2023-02-02 16:17:13
【问题描述】:
如何从字符串“C:\Program Files (x86)\Google\Update\GoogleUpdate.exe”中提取“GoogleUpdate.exe”?
【问题讨论】:
标签: reactjs
如何从字符串“C:\Program Files (x86)\Google\Update\GoogleUpdate.exe”中提取“GoogleUpdate.exe”?
【问题讨论】:
标签: reactjs
const str = "C:\Program Files (x86)\Google\Update\GoogleUpdate.exe";
const parts = str.split("\");
const fileName = parts.pop();
console.log(fileName); // outputs "GoogleUpdate.exe"
【讨论】: