This question is meant to be language agnostic. Using only Regular Expressions, can I find and replace duplicate lines in a file?
Please consider the follwing example input and the output that I want;
Input>>
11
22
22 <-duplicate
33
44
44 <-duplicate
55
Output>>
11
22
33
44
55