I have long list of lines with a lot of situations line this, lines that have identical first word (first string before space), but the rest is different. I need to keep only one line with unique first string.
john jane
john 123
john jim jane
jane john
jane 123
jane 456
jim
jim 1
To have this result:
john jane
jane john
jim
So, if first word in line is the match, delete all but one line.
I can delete all duplicate lines, but leave with lines like in example above,
^(.*)(\r?\n\1)+$
This regex delete identical lines, not like in the example. If there is regex or notepad macro to solve this?