I need a RegEx that matches the following:
(whatever) 3.4 Temp
(whatever) 7.8 Name
(whatever) 10.0 Other Name
Basically, it has to match whatever in the beginning, and then either two spaces, two digits, a dot and a digit or three spaces, one digit, a dot, and a digit, followed by two spaces and whatever.
This is easily matched with this RegEx:
.*? [\s|\d]\d\.\d .*?
However, I want to extract the decimal number and whatever's after it using a backreference. I was trying
.*? [\s(\d\.\d)|(\d\d\.\d)] (.*?)
However, referring to it with \1,\2 doesn't work, I think because the parentheses I'm referring to are in the optional square brackets with the '|' symbol. Is there a solution?