本帖最后由 zhengwei007 于 2024-1-5 15:12 编辑
我有个csv文件,里面有很多类似的样式如下,我随意粘了3行,请大家帮忙看看,可以直接粘到csv里。- 1 adena 7 10 100 70 apprentice's_shoes 1 1 63.7931 cloth_shoes 1 1 12.069 leather_sandals 1 1 12.069 short_gloves 1 1 12.0689 10.9692 stem 1 1 75 suede 1 1 25 1.3062
- 3 adena 25 35 100 70 apprentice's_earing 1 1 30.9859 magic_ring 1 1 46.0094 necklace_of_magic 1 1 23.0047 15.1467 varnish 1 1 11.3636 coal 1 1 11.3636 charcoal 1 1 11.3636 rp_bow 1 1 9.0909 wooden_arrow 20 39 56.8183 6.0713
- 4 adena 34 48 100 70 short_leather_gloves 1 1 33.3333 cotton_shoes 1 1 33.3333 crude_leather_shoes 1 1 33.3334 2.4971 stem 1 1 75 suede 1 1 25 2.5262
复制代码 如果英文名称后面是4组数字,则将数字直接写在后面,然后另起一行。
如果英文名称后面是3组数字,则将将后面出现4组数字的最后一组,写到前面的最后一组给补齐即可。
所以根据上面的内容,我希望通过批处理操作后,自动调整成以下格式:- 1 adena 7 10 100 70
- 1 apprentice's_shoes 1 1 63.7931 10.9692
- 1 cloth_shoes 1 1 12.069 10.9692
- 1 leather_sandals 1 1 12.069 10.9692
- 1 short_gloves 1 1 12.0689 10.9692
- 1 stem 1 1 75 1.3062
- 1 suede 1 1 25 1.3062
- 3 adena 25 35 100 70
- 3 apprentice's_earing 1 1 30.9859 15.1467
- 3 magic_ring 1 1 46.0094 15.1467
- 3 necklace_of_magic 1 1 23.0047 15.1467
- 3 varnish 1 1 11.3636 6.0713
- 3 coal 1 1 11.3636 6.0713
- 3 charcoal 1 1 11.3636 6.0713
- 3 rp_bow 1 1 9.0909 6.0713
- 3 wooden_arrow 1 1 56.8183 6.0713
- 4 adena 34 48 100 70
- 4 short_leather_gloves 1 1 33.3333 2.4971
- 4 cotton_shoes 1 1 33.3333 2.4971
- 4 crude_leather_shoes 1 1 33.3334 2.4971
- 4 stem 1 1 75 2.5262
- 4 suede 1 1 25 2.5262
复制代码 这个是我把json格式的多余字符全删除了,这玩意原本是json。。。谢谢各位大佬。 |