var json = "\\hello" json = json.replace(new RegExp("\\\\\\\\","g"),'\\'); //替换后输出结果 \hello 浪费几个小时时间,记录一下踩坑