In VIM, How to use regexp or other skills to remove the period between the 6th comma and the 9th comma for the multiple lines of the following texts?
Change from:
4,Afghanistan,2,Medium,1951,1951.5,4134.756,3705.395,7840.151,12.009
4,Afghanistan,5,Constant fertility,2023,2023.5,21628.67,20554.282,42182.952,64.613
To:
4,Afghanistan,2,Medium,1951,1951.5,4134756,3705395,7840151,12.009
4,Afghanistan,5,Constant fertility,2023,2023.5,2162867,20554282,42182952,64.613
I have a csv file with lots of similar records like this. As the position of the 6th and 9th comma may not be in the same column, I can't use block-wise visual mode to delete those periods.
One way to do this is to split comma to columns in excel and replace it in the columns of excel. But my csv file is more than 100 MegaBytes and my computer is too slow to do it.
Per my vi and regexp knowledge, I could use below regexp to locate the position of the 6th comma, but that's not enough.
/\([^,]*,\)\{-6}
Is there any advanced regexp usages to remove the period between the 6th comma and the 9th comma in a multi-line csv file?