js中反斜杠的正则替换
2018-11-14 本文已影响0人
blank的小粉er
var state={\"totalAmount\":1,\"vendorId\":\"696\",\"merTradeNo\":\"7a5f8719\"}
结果
var jg=state.replace(new RegExp('\\\\','g'),"");
var state={\"totalAmount\":1,\"vendorId\":\"696\",\"merTradeNo\":\"7a5f8719\"}
var jg=state.replace(new RegExp('\\\\','g'),"");