我有以下代码
infile = botslib.opendata(ta_from.filename,'r')
tofile = botslib.opendata(str(ta_to.idta),'wb')
start = infile.readline()
import textwrap
import re
lines= "\r\n".join(textwrap.wrap(start, 640))
for line in lines:
re.sub('^\...[_]*', '',line)
tofile.write(line.split('_')[-1])
infile.close()
tofile.close()
输入是
Ichg_UNBUNOA3 14 2090100000015 14 1304221445000001
现在的输出是 IchgUNBUNOA3 14 2090100000015 14 1304221445000001
但我希望它是 UNBUNOA3 14 2090100000015 14 1304221445000001
ichg 也可以是 grp1 grp12
我究竟做错了什么?