Replace 替换文本中的多个标记

Replace 替换文本中的多个标记,replace,javascript,Replace,Javascript,我想更改以下文字图片: [?”我的名字叫“卡多拉·穆杰罗” 法莱西多公园 精液康涅拉西翁酒店] 因此,我想删除“,”和 有没有办法同时改变一切 我试过: function replaceThings(){ jQuery(".summary").each(function(){ var t = jQuery(this).text(); jQuery(this).text(t.replace(/& lt;/g, '')); jQuery

我想更改以下文字图片:

[?”我的名字叫“卡多拉·穆杰罗” 法莱西多公园 精液康涅拉西翁酒店]

因此,我想删除“,”和

有没有办法同时改变一切

我试过:

function replaceThings(){
    jQuery(".summary").each(function(){
        var t = jQuery(this).text();
        jQuery(this).text(t.replace(/& lt;/g, ''));
        jQuery(this).text(t.replace('[', ''));
        jQuery(this).text(t.replace(']', ''));
    });
但只会取代[1]

提前谢谢

function replaceThings(){
    jQuery(".summary").each(function(){
        var t = jQuery(this).text();
        t = t.replace(/& lt;/g, ''));
        t = t.replace('[', ''));
        t = t.replace(']', ''); 
        jQuery(this).text(t);
    });