解决方案 »

  1.   

    去掉所有没用的html标签,样式,只剩下有内容的html,样式,及标签内容
      

  2.   

    var str = '<p>《来自星星的你》接档剧,有天欧巴主演。看最新中文字幕第四集,抢有天专属铭牌!</p><table cellpadding="0" '+
                  'cellspacing="0" align="left"><tbody>'+
                  '<tr class="firstRow"><td><br/></td></tr>'+
                  '</tbody>'+
                  '</table><br/>'+
                  '<p></p>'+
                  '<p><br/></p>';
        var match = str.match(/<(\w)+(?:[^>])*>([^<]+)<\/\1>/g);
        console.log(match)