I am having trouble finding any regex which actually matches what I need, despite how easy this request seemed when I started out. Hoping to get help here.
An early mistake in our code is sending dates in the format YYYY-MM-DD HH:mm:ss:SSS
. This is not valid ISO, as the milliseconds are proceeded by a colon, not a period.
I wanted a quick regex to use in conjunction with JS .replace() to match the third colon :
and replace it with a period .
As I said, this sounded pretty basic -- but I have found nothing that works, and no other places where the suggested fix for a similar problem has worked in my case.
Any help is appreciated.