正則替換編輯器特殊字符

txt.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;nbsp;/g,"").replace(/<\/?.+?>/g,'').replace(/(\s{2,80})/g,'').replace(/nbsp;/g,"")

相關文章
相關標籤/搜索