1

我有以下数据

11111 | aff | baucj | blah | blah
13331 | azvaff | bcacj | blah | blah
11111 | aasfff | aascj | blah | blah
13331 | aafzvff | baucj | blah | blah
12221 | arthrf | bacsfucj | blah | blah
12221 | ddhrhsd | hdafasfacj | blah | blah

我希望这些像合并

11111 | aff | baucj | blah | blah | 11111 | aasfff | aascj | blah | blah
13331 | azvaff | bcacj | blah | blah | 13331 | aafzvff | baucj | blah | blah
12221 | arthrf | bacsfucj | blah | blah | 12221 | ddhrhsd | hdafasfacj | blah | blah
4

1 回答 1

0

怎么样:

find what: ^(\S+)(.+?)\n((?:(?!\1).*)?)(\1 .+?)\n
replace by: $1$2 | $4\n$3

检查“正则表达式”和“点匹配换行符”(我不确定这些标签,我没有英文版的 NP++)

于 2013-09-13T13:34:22.760 回答