I have some text that I need to remove some dots
The file has multiple lines, and I want to change only the ones more or less like these, other lines should be untouched
Subject: This.Text.Here.”some date like dd.mm.yy”.”some.other.text.to.remain.untouched”
Subject: ThisText.Here.”some date like dd.mm.yy”.”some.other.text.to.remain.untouched”
Subject: ThisTextHere.”some date like dd.mm.yy”.”some.other.text.to.remain.untouched”
ThisTextHere is an example and can be any text (alpha only) separated by any number of dots
“some date like dd.mm.yy” equals any date in the format 01.02.03
“some.other.text.to.remain.untouched” is what the text says can be a single alphanum to a whole text
Each line only contains this chars [A-Za-z0-9. :]
The ouput should be
Subject: ThisTextHere.’some date like dd.mm.yy’.some.other.text.to.remain.untouched
Need to keep last dot before ‘some date like dd.mm.yy’.some.other.text.to.remain.untouched
As I need to do a inline replace I’m using sed, managed to get here (this is just an example as the command should be sed -i -E …. FILE)
echo Subject: some.text.here.11.11.11.dsfa.gfd.gfg | sed -E ‘/^Subject:/ {s/.[^.0-9]//g}’
Subject: someextere.11.11.11sfafdfg
This is not stopping where it should and it’s deleting the dot and the first digit
TIA