Reputation: 35
For example, I would like to following list:
E|MG000|HIST|062575|08012019|062575|MG003
L|22WBM3|1|1871.1
E|MG000|HIST|020590|31012019|020590|MG003
L|10B771D015|-4|8.488
E|MG000|HIST|062575|21022019|062575|MG003
L|22WBM3|-1|1871.1
to look like this:
E|MG000|HIST|062575|08012019|062575|MG003 - L|22WBM3|1|1871.1
E|MG000|HIST|020590|31012019|020590|MG003 - L|10B771D015|-4|8.488
E|MG000|HIST|062575|21022019|062575|MG003 - L|22WBM3|-1|1871.1
Upvotes: 0
Views: 243
Reputation: 91375
\R(?=L)
-
(space hyphen space)Explanation:
\R # any kind of linebreak
(?= # positive lookahead, make sure we have after:
L # letter L
) # end lookahead
Screenshot (before):
Screenshot (after):
Upvotes: 0