I need help with editing a DateTime string in my TypeScript file.
The specific string I'm working with is 02T13:18:43.000Z
.
My goal is to remove the first three characters, including the letter T at the beginning of the string, as well as the last 5 characters, which are Z000.
(including the dot). Ultimately, I want the final result to be 13:18:43
.
I have tried using the regex pattern (^(.*?)T)
to achieve the first part of the trimming process, but it only leaves me with 13:18:43.000Z
.
Can someone suggest a regex pattern that would help me accomplish both parts of the trimming? I attempted to add (Z000.)$
to the existing pattern, but it didn't work.
Thank you for your assistance. Any guidance on this matter would be greatly appreciated.