Notepad ++排序/替换

时间:2018-07-14 07:35:03

标签: notepad++

我有一个这样的列表

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; };

类似\ n {quality = 1;价格= 我在这里做什么..; };

1 个答案:

答案 0 :(得分:1)

我进行了一些搜索,发现可以使用“ Coloumn编辑器”来执行此操作。原始帖子不是“ true”,因为我的第一个列表中已经有“ {quality = ...”数据。一切都变得艰辛,所以我花了几秒钟来做到这一点。

按住ALT键,然后选择要替换的数字。转到“编辑”->“ Columun编辑器”,这很容易解释