requesterror: Unclosed quotation mark after the character string ‘}‘ ‘.

MSSQLinsert failed,

JS a.replace(/[']/g,'`'); //全局替换

let a = "AAAA'BBBBB 'CCCC'"
let b = a.replace("'"," ") //只替换了第一个
let d = a.replace(/[']/g,'`'); //全局替换

console.log(b)   //"AAAA BBBBB 'CCCC'"
console.log(d)   // "AAAA`BBBBB `CCCC`"


    // let requestText = response.request.body.replace("'","''");  //request Consignee name with '
    let requestText = response.request.body.replace(/[']/g,'`');;  //request Consignee name with '

上一篇:zabbix


下一篇:4. Bean的scope作用域:singleton 、prototype、 request 、session