我有一个 TEXT 文件包含字符串
示例logs.txt
:
value1 A
value2 B
value3 c
row
row
row
value1 A
value2 D
value3 c
row
value1 E
value2 B
value3 A
row
row
value1 Z
value2 B
value3 E
我想要的只是用“|”垂直获取所有值A、值B、值C 管道分隔符
输出:
value1 A|value2 B|value3 C
value1 A|value2 D|value3 C
value1 E|value2 B|value3 A
value1 Z|value2 B|value3 E