Navigation

    Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

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

    Help wanted · · · – – – · · ·
    duplicate words regex
    2
    3
    1578
    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 braut
      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 Frank 1 Reply Last reply Reply Quote 0
      • Claudia Frank
        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 braut
          nafri braut last edited by

          Thank you!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright © 2014 NodeBB Forums | Contributors