替换 &开头。;结尾之间的内容。用空格代替他们 var regExp = /&.*?;/g; var str = '123&asdsa;dqwe'; str = str.replace( regExp, "" ) console.log(str);//123dqwe