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.
Input string examples:
"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
Can you help with the regex?
Thanks
So here is your working solution, if the “highGrade” is not available the second group is
NULL.