title: Swap minus sign from after the number to in front of the number using SED (and Regex)
body: <p>I've got a text-file with the following line:</p>
  
  <pre><code>  201174480 11-01-1911 J Student            25-07 11585 2 0        SPOED BEZORGEN                       1ST      25,00
    320819019 11-01-1911 T. Student           28-07 13561 1 15786986 DESLORATADINE TABL OMH 5MG          60ST       3,60
    706059901 11-01-1911 ST Student-Student   30-06 14956 1 15356221 METOPROLOLSUCC RET T 100MG         180ST      12,90-
  </code></pre>
  
  <p>I want to change this line with SED into:</p>
  
  <pre><code>  201174480 11-01-1911 J Student            25-07 11585 2 0        SPOED BEZORGEN                       1ST      25,00
    320819019 11-01-1911 T. Student           28-07 13561 1 15786986 DESLORATADINE TABL OMH 5MG          60ST       3,60
    706059901 11-01-1911 ST Student-Student   30-06 14956 1 15356221 METOPROLOLSUCC RET T 100MG         180ST      -12,90
  </code></pre>
  
  <p>So I want to swap the minus sign so that I get-12,90 in stead of 12,90- with SED. I tried:</p>
  
  <p>try 1:</p>
  
  <pre><code>sed 's/\([0-9.]\+\)-/-\1/g' file.txt &gt; file1.txt
  </code></pre>
  
  <p>try 2:</p>
  
  <pre><code>sed 's/\([0-9].\+\)-$/-\1/g' file.txt &gt; file1.txt
  </code></pre>
  
  <p>So there must be something wrong with the REGEX but I donot really understand it. Please help.</p>