机床加工程序的点位文件修改
GOTO / 276.9030638495, 0.0000000000, 68.4009375000GOTO / 276.9030638495, 1.9963192299, 68.4009375000
GOTO / 126.1013337483, 1.9963192299, 68.4003795121
GOTO / 124.9592567799, 1.8219915506, 68.4004282381
GOTO / 123.8115984115, 1.6892880812, 68.4004653299
GOTO / 122.6598751714, 1.5983841777, 68.4004907383
GOTO / 121.5056089594, 1.5493999615, 68.4005044298
GOTO / 120.3503250358, 1.5424001608, 68.4005063863
.
.
.
上面是一个txt里面几百行文本,怎么才能编成如下另一个text文本
began
276.9030638495, 0.0000000000, 68.4009375000
276.9030638495, 1.9963192299, 68.4009375000
end
began
126.1013337483, 1.9963192299, 68.4003795121
124.9592567799, 1.8219915506, 68.4004282381
end
began
123.8115984115, 1.6892880812, 68.4004653299
122.6598751714, 1.5983841777, 68.4004907383
end
began
121.5056089594, 1.5493999615, 68.4005044298
120.3503250358, 1.5424001608, 68.4005063863
end
.
.
.
等等。
就是读取一个文件,删除每行的GOTO /.然后每两行开头加began,结尾加end
请大神指点,感谢!