I need to parse a duration string, of the form 98d 01h 23m 45s into milliseconds.
98d 01h 23m 45s
I was hoping there was an equivalent of SimpleDateFormat
SimpleDateFormat
The new java.time.Duration class in Java 8 let's you parse durations out of the box:
Duration.parse("P98DT01H23M45S").toMillis();
the format is slightly different so would need adjusting prior to parsing.