Notepad++排序/替换

问题描述 投票:0回答:1

我有一个这样的清单

class TRYK_U_B_Sage_Tshirt
class TRYK_U_B_BLK3CD
class TRYK_U_B_BLK3CD_Tshirt
class TRYK_U_B_BLK
class TRYK_U_B_BLK_Tshirt
class TRYK_U_B_BLKTAN
class TRYK_U_B_BLKTAN_Tshirt
class TRYK_U_B_ODTAN
class TRYK_U_B_ODTAN_Tshirt
class TRYK_U_B_BLK_OD
class TRYK_U_B_BLK_OD_Tshirt
class TRYK_U_B_C01_Tsirt
class TRYK_U_B_C02_Tsirt
class TRYK_U_B_OD_BLK
class TRYK_U_B_OD_BLK_2
class TRYK_U_B_BLK_TAN_1

我想将以下内容添加到每行的末尾=

{ quality = 1; price = n+1; };
这就是我正在寻找的输出

class TRYK_U_B_Sage_Tshirt              { quality = 1; price = 1; };
class TRYK_U_B_BLK3CD                   { quality = 1; price = 2; };
class TRYK_U_B_BLK3CD_Tshirt            { quality = 1; price = 3; };
class TRYK_U_B_BLK                      { quality = 1; price = 4; };
class TRYK_U_B_BLK_Tshirt               { quality = 1; price = 5; };
class TRYK_U_B_BLKTAN                   { quality = 1; price = 6; };
class TRYK_U_B_BLKTAN_Tshirt            { quality = 1; price = 7; };
class TRYK_U_B_ODTAN                    { quality = 1; price = 8; };
class TRYK_U_B_ODTAN_Tshirt             { quality = 1; price = 9; };
class TRYK_U_B_BLK_OD                   { quality = 1; price = 10; };
class TRYK_U_B_BLK_OD_Tshirt            { quality = 1; price = 11; };
class TRYK_U_B_C01_Tsirt                { quality = 1; price = 12; };
class TRYK_U_B_C02_Tsirt                { quality = 1; price = 13; };

类似的东西 { 质量 = 1;价格 = 我在这里做什么..; };

notepad++
1个回答
1
投票

我做了一些搜索,发现我可以使用“列编辑器”来做到这一点。原始帖子不是“真实的”,因为我的第一个列表中已经有了“{quality =...”数据。一切都已对齐,所以我花了几秒钟才完成此操作。

按住 ALT 并选择要替换的数字。转到“编辑”->“列编辑器”,它非常不言自明

© www.soinside.com 2019 - 2024. All rights reserved.