title: Remove last decimal/period on echo
body: <p>I have the following batch file. It scans a json file to retrieve the version.</p>
  <pre><code>@for /f &quot;usebackq tokens=2 delims=, &quot; %%i  in (`findstr /l &quot;version&quot; &quot;C:\test\test\package.json&quot;`) do @set str=%%~i
  @set str=%str:.=%
  @echo.%str%
  </code></pre>
  <p>It's returning correctly like the version 4.2.20 from my json file., and remove the periods as well.</p>
  <p>my questions however, is there a way to remove the last period/decimal only?</p>
  <p>Currently it's returning like this
  if the version is 4.2.20 = it returns 4220
  if the version is 3.4.1 = it returns 341.</p>
  <p>I want it to return to this only 4.220 or 3.41
  Thank You!</p>