我想在最后一个数字出现时拆分字符串“111A1A.11111.SL.111FUND II GP_KY.zip”。
string="111A1A.11111.SL.111FUND II GP_KY.zip";
output="FUND II GP_KY.zip";
我尝试过,但没有成功
var string_a = "jkjkhj89898";
var x = string_a.match(/[^\d]+|\d+/g);
console.log(x)
var string = "111A1A.11111.SL.111FUND II GP_KY.zip";
var lastNumberMatch = string.match(/.*(\d+)(\D+.*)/);
if (lastNumberMatch) {
var output = lastNumberMatch[2];
console.log(output); // "FUND II GP_KY.zip"
}