类似如下结构的数据:
10,Rigid ANC
4(OPE),-1677,-1356,-6495,8251,-7712,970,-0.000,-0.000,-0.000
5(OPE),-1693,-1334,-6491,8137,-7815,993,-0.000,-0.000,-0.000
24(SUS),41,25,-3769,2735,154,-22,0.000,0.000,-0.000
25(SUS),41,25,-3769,2735,154,-22,0.000,0.000,-0.000
70,Prog Design VSH
4(OPE),0,0,-1711,0,0,0,-31.880,-13.838,18.933
5(OPE),0,0,-1713,0,0,0,-32.468,-13.020,18.811
24(SUS),0,0,-2046,0,0,0,0.546,-2.790,0.603
25(SUS),0,0,-2046,0,0,0,0.546,-2.790,0.603
要在4(OPE), 5(OPE),24(SUS), 25(SUS)前面添加前面的只有两列的行的数字,变为如下:
10,Rigid ANC
10,4(OPE),-1677,-1356,-6495,8251,-7712,970,-0.000,-0.000,-0.000
10,5(OPE),-1693,-1334,-6491,8137,-7815,993,-0.000,-0.000,-0.000
10, 24(SUS),41,25,-3769,2735,154,-22,0.000,0.000,-0.000
10,25(SUS),41,25,-3769,2735,154,-22,0.000,0.000,-0.000
70,Prog Design VSH
70,4(OPE),0,0,-1711,0,0,0,-31.880,-13.838,18.933
70,5(OPE),0,0,-1713,0,0,0,-32.468,-13.020,18.811
70,24(SUS),0,0,-2046,0,0,0,0.546,-2.790,0.603
70, 25(SUS),0,0,-2046,0,0,0,0.546,-2.790,0.603
请问用正则如何实现呢? |