Notepad++ 合并列表

Notepad++ Merge list

列表 1

text1
text2
text3
text4

列表 2

value1
value2
value3
value4

结果

text1=value1
text2=value2
text3=value3
text4=value4

如何在 Notepad++ 中执行此操作?

遵循我的解决方案。

首先,将两个列表连接起来,用一个特殊字符分隔它们(在下文中,我将使用§):

text1
text2
text3
text4
§
value1
value2
value3
value4

然后:

  1. 查找内容:^(?!§$)(?!.*=)(.*)([\w\W]*?^§\r?\n)(.*)\r?\n?
  2. 替换为:=
  3. 确保具有以下设置:

  1. 根据需要多次点击 Replace 键。
  2. 终于去掉了特殊字符。