I have a 4GB JSON file in which there are multiple Date fields. the Date format is 2021-10-15T06:02:50.455Z. I want to replace this format with a simple date and time like this 2021-10-15T06:02:50
Is there any way I can do this with sed command
sed -e 's/[1-9][0-9]\{3\}-[0-9]\{2\}-[0-1][0-9]T[0-3][0-9]:[0-9]\{2\}:[0-9]\{2\}.[0-9]\{3\}Z/magic_here/g' test.json
I'm looking forward to Linus script but node or python also worked.
PS: regex is working fine