正则匹配class并替换整个class为空

str.replace(/class=["|'](.*?)["|'].*?/g, '')

  

原文地址:https://www.cnblogs.com/qq364735538/p/11179936.html