views:

23

answers:

1

Hi!

I have this pice of text I would like to change:

[¿Cómo se procede cuando la mujer o pareja de un < b>fallecido< /b> pide la congelación del semen]

So I would like to remove ], [ and < b>< /b>

Is there any way to change it everything in the same time??

I tried:

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(']', ''));
    });

But only replaces ].

Thanks in advance

A: 
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);
    });
Abdo
thanks, that is
Blanca