jsのreplaceはすべて動態的な文字列を交替します.
242 ワード
jsは繰り返しの言葉を動的に置き換えます.
let title = ” “;
let doubleTitle = title;
arrPara[i] = arrPara[i].replace(new RegExp(doubleTitle,'gm'),title);// 1
arrPara[i] = arrPara[i].replace(doubleTitle,"");// 2