I am trying to parse time bookings looking like this:
14687 - Project foobar, homeOffice 7:40 - 13:59
436 - Project barfoo, office 12:49 - 22:00
I want to grab all the text before the first occurrence of a time. The time has the 24 hour format HH:MM without leading zero. There can be one or two occurrences of such a timestamp. I figured this is the RegEx to match the time in this format:
(\d?\d:\d\d)
But how would I get the text before it? I am using javascript.