@tenchyUK,
Does order of the lines matter in the final results?
Can there ever be 3 or more lines that you want to compress into one (ie, could there ever be three or more of the G7ODA lines, or will it always only be a single short and a single long?)
Assuming order doesn’t matter, assuming never more than a pair of almost-duplicate lines:
P01AZ,IO55WS,XY,
P01AZ,IO55WS,,
G7ODA,IO93WS,
G7ODA,IO93WS,PE,
Edit > Line Operations > Sort Lines Lexicographically Ascending
Search > Replace
FIND WHAT = ^(.*?,.*?,),*\R\1
REPLACE WITH = $1
SEARCH MODE = regular expression
REPLACE ALL
End Result:
G7ODA,IO93WS,PE,
P01AZ,IO55WS,XY,
If one or both of my assumptions are wrong, provide enough example data to counter my assumptions (use the </> button on the toolbar and put the text between the ``` lines it creates), showing both the original data, and how you want it to look at the end…
(It’s possible to restore the order, by adding/removing numbers in extra steps… but that gets complicated, and I didn’t want to overwhelm you if the final order of data doesn’t matter. Similarly, the FIND WHAT regex can be made more complex to handle removing one-or-more short lines, but if your data is as simple as my example, then this should be sufficient.)