在正则表达式中,如何匹配某个水平位置的字符?我想n
用逗号后跟三个空格替换逗号位置,即
s/,/, / # replace ',' at position n=4 with ', '
但是这些正则表达式仍然错过了水平位置约束。
和...一起
s/,/, / # replace ',' at position n=3 with ', '
s/,/, / # replace ',' at position n=2 with ', '
我想用它来重新格式化数据列,从
1,10000,0.187929453,10000
162,28000,0.045417083,28000
22,100000,0.020914811,100000
64,1000,0.234950091,10000
65,46000,0.037523632,46000
66,118000,0.015378538,118000
到
1, 10000, 0.187929453, 10000
162, 28000, 0.045417083, 28000
22, 100000, 0.020914811, 100000
64, 1000, 0.234950091, 10000
65, 46000, 0.037523632, 46000
66, 118000, 0.015378538, 118000