Ver originalreturn (parseFloat(a.replace(/[^\d.]+/g, '')) > parseFloat(b.replace(/[^\d.]+/g, '')) ? 1 : -1);