Community
    • Login

    RegEx for duplicate words (I'm not familiar withRegEx)

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    duplicate wordsregex
    3 Posts 2 Posters 2.1k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • nafri brautN Offline
      nafri braut
      last edited by

      Hello,

      could some tell me how to find and delete duplicate words with RegEx?

      I have a file with several thousand words. The words are grouped, that means the heading in one line. The following group members are indented with a tab - one indented word per line. Now I have a list of words that I want to delete from this grouped file. I copied this list into the file with the grouped words. That means, at the end of the document are several words that are not indented with a tab - one word per line.

      I need to delete the duplicate words (both words). Only exacte matches need to be deleted.
      I could search for each word by hand, but this would take me days. I am not familiar with regex, but I know that there should be a simple solution for this.

      Is there someone who could help me? Please let me know, if you need further information.

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC Offline
        Claudia Frank @nafri braut
        last edited by

        @nafri-braut

        don’t copy the list of words into the document.
        Copy it into the find what field like this

        \b(word1|word3|word5|word7|word8...)\b
        

        leave replace empty and check regular expression.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • nafri brautN Offline
          nafri braut
          last edited by

          Thank you!

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors