title: How to parse String containing time units (ms/ns/ps/fs etc) to double in Java
body: <p>How to parse String expressing time (containing double and timeunit suffix (ms/ns/ps/picosecond(s)/us/fs/msec/ miliseconds etc... )) into double second.</p>
  
  <p>E.g. Input String</p>
  
  <pre><code>"1.23 ms"
  "0.98 ns"
  "33 s"
  </code></pre>
  
  <p>Output double:</p>
  
  <pre><code>0.00123
  0.0000000098
  33.0
  </code></pre>
  
  <p>Thanks</p>