Delete duplicate WORDS

Delete duplicate WORDS

3
NewbieNewbie
3

    May 21, 2006#1

    is there any marco out there which deleted duplicate words? (not only lines)
    like this

    one two one three eight seven eight

    to this

    one
    two
    three
    eight
    seven

    it should do the same thing with numbers, for example ips

    6,682583
    Grand MasterGrand Master
    6,682583

      May 21, 2006#2

      According to your example you can use the Remove Duplicates feature of the sort command. You only have to replace all spaces/tabs by a line break which can be done for example with a non regex replace by searching for a space and replace it with ^p. Or more sophisticated with following UltraEdit style regex:

      Find What: [ ^t]+
      Replace With: ^p
      Best regards from an UC/UE/UES for Windows user from Austria

      3
      NewbieNewbie
      3

        May 21, 2006#3

        thanks for the answer could u pls tell me where i does find the remove duplicates feature?! :/

        and is there a feature to delete every word with more than for example 8 chars ?

        6,682583
        Grand MasterGrand Master
        6,682583

          May 21, 2006#4

          nopid wrote:could u pls tell me where i does find the remove duplicates feature?!
          File - Sort - Advanced Sort/Options. Sorts the whole file or only the current selection with the options you specify in this dialog.
          nopid wrote:and is there a feature to delete every word with more than for example 8 chars ?
          Can be done with a regular expression search and replace. I assume, you have already used the regex replace above to have only one word per line (and maybe you have also already sorted the lines).

          To delete words with more than 8 characters use following UltraEdit style regex replace:

          Find What: ?????????[~ ^t^p]++
          Replace With:

          There are 9 ?.

          Or following a little bit more complicated regex which should also work in any text without preparation.

          Find What: [~ ^t^p][~ ^t^p][~ ^t^p][~ ^t^p][~ ^t^p][~ ^t^p][~ ^t^p][~ ^t^p][~ ^t^p][~ ^t^p]++
          Replace With:

          [~ ^t^p] means any character except a space, a tab or a DOS line break. A ++ after this expression means 0 or more times of the expression/character before. See UE/UES help about the Find command for details.
          Best regards from an UC/UE/UES for Windows user from Austria

          3
          NewbieNewbie
          3

            May 21, 2006#5

            NICE it worked :) Schönen Dank auch :)