大家好,又见面了,我是你们的朋友全栈君。
String.prototype.matchAll = function(reg){
let matchArr=[];
let match;
while (( match = reg.exec(this)) !== null) {
matchArr.push(match);
}
return matchArr;
};
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/163368.html原文链接:https://javaforall.net