Ver originalfunction reemplazarTag(tag,txt){ var re=new RegExp("<"+tag+"+[^>]*>(.*?)</"+tag+">","gim"); return txt.replace(re,RegExp.$1);}