JSFiddle - React, Tailwind, and code Playground

JavaScript

str="000 + 0001  +  (000150.009 + 0000.01000) +1000";
reg=/0*(\d+(\.\d+)?)/g;
str=str.replace(reg,"$1");
console.log(str);