Replace Duplicates with Single Copy

  • Jonathan Archer

    Jonathan Archer - 2012-03-01

    I have a list of e-mail addresses and I would like to replace all duplicates with a single copy (\1), but I'm not sure what regex is involved to find each e-mail address. >.<

  • Anonymous - 2012-03-01

    Use TextFX/Tools/Sort and select output UNIQUE.

  • Jonathan Archer

    Jonathan Archer - 2012-03-02

    Ah, thank you - but is it possible without using the TextFX plugin? I also don't appear to have any positive response from selecting such an option. I was using a program called replace pioneer, but a regex alternative would be greatly beneficial for personal enrichment.

  • François-R Boyer

    If you want to remove duplicate lines, when several adjacent lines are identical, it can be done with the following regex: replace "^(.+\r?\n)\1+" by "\1".  It requires better regex support than what is currently included in Notepad++, just download the binary of this recent patch .

  • Jonathan Archer

    Jonathan Archer - 2012-03-03

    Thank you for your help!

  • Fool4UAnyway

    Fool4UAnyway - 2012-03-03

    You could use Text Crawler's Extract and one of its Search Pad features.

    Just Extract all items from the list (.* or specifiy the email address regex).
    Then in the Scratch Pad choose to remove duplicate items.


    AZJIO - 2014-01-05

    Add it "Edit -> Line Operations -> Remove duplicates of lines"

    You can use "Scripting.Dictionary"


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks