code='010697288498458211210105102012270210008'; code = code.trim().replace(/[^\d]/g, ''); console.log(code)