const s = '23+-22.2222+-2334+5-5/22*5*-8'; const re = /(?!:\W)(\-)?(\d+)[.]?(\d+)?/gm; console.log ( s.match ( re ) ); //[ '23', '-22.2222', '-2334', '5', '-15', '22', '5', '-8' ]