2025-03-30 04:52:27
var str = "12,,34,,32,,44,";
var reg = /\d+\,/g;
var strNum = str.match(reg);
console.log(strNum);
采纳即可
那若果我的目标字符串是:"|346,,|23,,|78,"
那该如何拆分成 ["|346,","|23,","|78,"]
var reg = /\|\d+\,/g;
最后,采纳即可
采纳即可
采纳即可
ok
拆分后["|144,", "|145,", "|363,", "|364,", "|413,"]
2025-03-30 03:36:12