Page 1 of 1

Find duplicate lines and delete both lines

Posted: Mon Mar 19, 2018 3:17 am
by 53cricketballs
Hello, I would like to know if textcrawler is able to find duplicate lines in a text file and delete both lines?

ie:

12345
12345
67890

would become

67890


TIA

Re: Find duplicate lines and delete both lines

Posted: Mon Mar 19, 2018 11:26 am
by DigitalVolcano
You can use this providing the duplicate lines are next to each other:

Code: Select all

^(.*)(\r?\n\1)+$
Replacing with nothing will delete both lines.