title: Java regex question with groups
body: <p>I want to be able to parse below strings with a single regex using groups? There may or may not be single/multiple whitespace between dash and numbers. </p>
  
  <p>Input string examples:</p>
  
  <pre>
  "0.4 - 1.2 Mathematics"
  "0.7-1.3 Physics"
  "0.3-    0.7      Chemistry"
  "4.5 Biology"
  "2 Calculus"
  
  group(1) -> lowGrade -> Float
  group(2) -> highGrade -> Float (if exists)
  group(3) -> class -> String
  </pre>
  
  <p>Can you help with the regex?
  Thanks</p>