Community
    • 登入

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

    已排程 已置頂 已鎖定 已移動 Help wanted · · · – – – · · ·
    duplicate wordsregex
    3 貼文 2 Posters 1.8k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • nafri brautN
      nafri braut
      最後由 編輯

      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 條回覆 最後回覆 回覆 引用 0
      • Claudia FrankC
        Claudia Frank @nafri braut
        最後由 編輯

        @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 條回覆 最後回覆 回覆 引用 0
        • nafri brautN
          nafri braut
          最後由 編輯

          Thank you!

          1 條回覆 最後回覆 回覆 引用 0
          • 第一個貼文
            最後的貼文
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors