I’m on mobile, so sorry if this is a little short, but to be able to get stuff out of the regex you’ll need to add grouping parentheses into it.
So if you do this:
const project =
x.text.match(/^(\d{2}:\d{2})-(\d{2}:\d{2}).project::(.*)/)
You’ll get an array back if it matches:
-
project[0]– The entire match -
project[1]– The first match, the starting time -
project[2]– The second match, the end time -
project[3]– The third match, the rest of the line, related to the project field