in reply to Re^4: How to check lines that start with the same word then delete one of them
in thread How to check lines that start with the same word then delete one of them

If you are not to work with lines which have different beginnings, then you can divide a problem: 1. group lines by their beginnings, 2. then solve a problem in each group separately.
  • Comment on Re^5: How to check lines that start with the same word then delete one of them