I have text files with repeated exact lines of text, but I only want one of each. Imagine this text file:
AAAAA
AAAAA
AAAAA
BB
BBBBB
BBBBB
CCC
CCC
CCC
I would only need the following four lines from it:
AAAAA
BB
BBBBB
CCC
I'm using a text editor (EmEditor or Notepad++), that supports RegEx, not a programming language, so I must use a purely Regular Expression.
Any help?
EDIT: I checked the other thread that hsz mentioned and I'd like to make it clear that this one is not the same. Although both need to remove duplicate lines, the way to achieve it is different. I need pure RegEx, but the best answer from the other thread relies on a specific Notepad++ plug-in (which doesn't even come with it any more), so it's not even a regex solution. The second case there, is a regex and it does work on Notepad++, but not on EmEditor at all, which I also need. So I don't think my question is a repetition of that one, although that link is useful, an so I thank hsz for it.