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
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);
});
精彩评论