vue 把字符串的所有=替换成&&&的方法

//把字符串中所有=换成&&&
                let reg=new RegExp('=','g')//g代表全部
                let newMsg=JSON.stringify(msg).replace(reg,'&&&');
                console.log(newMsg)

 

posted @ 2019-09-05 12:42  奔跑吧前端(李钊)  阅读(31268)  评论(0编辑  收藏  举报