Skip to content
Snippets Groups Projects
Commit 445db7ca authored by Thomas Kennedy's avatar Thomas Kennedy
Browse files

Update Java Temperature Input library to use a more robust regex

parent 56782a2d
No related branches found
No related tags found
No related merge requests found
......@@ -89,7 +89,7 @@ public class TemperatureParser
int stepSize)
{
String[][] rawLines = inputTemps.lines()
.map(s -> s.split("°C\\s*"))
.map(s -> s.split("([^0-9]*\\s)|([^0-9]*$)"))
.toArray(String[][]::new);
List<CoreTempReading> allReadings = new Vector<>(rawLines.length);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment