Say you have the following text:
abc
123
abc
456
789
abc
abc
I want to remove all \"abc\" lines and just keep one. I don\'t mind sorting. T
To add to @Marc.2377 's reply.
If the order is important and you don't care that you just keep the last of the duplicate lines, simply search for the following regexp if you want to only remove duplicte non-empty lines
^(.+\n)(?=(?:.*\n)*?\1)
If you also want to remove duplicate empty lines, use * instead of +
^(.*\n)(?=(?:.*\n)*?\1)
and replace with nothing.
This will take a line and try to find ahead some more (maybe 0) lines followed by the exact same line taken. It will remove the taken line.
This is just a one-shot regex. No need to spam the replace button.