實用記錄code
let text = "內容{{first.DATA}}辦理單位:{{keyword1.DATA}}辦理時間:{{keyword2.DATA}}辦理狀況:{{keyword3.DATA}}{{remark.DATA}}" let regex = /\{\{(.+?)\./g; let result; while ((result = regex.exec(text)) != null) { console.log(result); // 取值轉化值 }