title: Android/Java Regex to remove extra zeros from sub-strings
body: <p>I have the following string as input :</p>
  
  <pre><code>"2.0,3.00,-4.0,0.00,-0.00,0.03,2.01,0.001,-0.03,101"
  </code></pre>
  
  <p>Final output will be like : </p>
  
  <pre><code>"2,3,-4,0,0,.03,2.01,.001,-.03,101"
  </code></pre>
  
  <p><strong>i.e.</strong> all leading and trailing zeros will be removed and both positive/negative zeros will be simply zero.</p>
  
  <p>We can achieve this by split the string first and using Regex for each part. But <em>my string size is more than 10000</em>.<br> How can we achieve this using <code>Regex</code>?</p>
  
  <p>Edit:</p>
  
  <p><strong>Analysis of Answers:</strong> </p>
  
  <p>I have tested all answers with String <code>"0.00,-0.00,00.00,-00.00,40.00,-40.00,4.0,-4.0,4.01,-4.01,04.01,-04.01,004.04,-004.04,0004.040,-0004.040,101,.40,-.40,0.40,-0.40"</code> and answer from <strong><em>Wiktor Stribiżew</em></strong> passed all the test cases .(see here : <a href="https://regex101.com/r/tS8hE3/9" rel="nofollow">https://regex101.com/r/tS8hE3/9</a> ) Other answers were passed on most of the cases but not all. </p>