how can i slice string with regular expression? [closed]

startDate=2023-02-24T21:00:00.000Z - endDate=2023-02-26T20:59:59.000Z

i’ve date in string like this, i need to transform it to

2023-02-24 21:00 - 2023-02-26 20:59

is it possible with regex? and is it good idea to use it for this case?