Special Case: Remove Duplicates TOTALLY, not just one

Special Case: Remove Duplicates TOTALLY, not just one

8

    Nov 14, 2007#1

    I have a file that contains many words.

    Suppose:

    0x000021E8
    0x000021EC
    0x000021F0 <DUPLICATE
    0x000021F0 <DUPLICATE
    0x000021F4
    0x00002239
    0x00002238 <DUPLICATE
    0x00002238 <DUPLICATE

    BOTH the duplicates need to be totally removed [not just one]

    final result should be:

    0x000021E8
    0x000021EC
    0x000021F4
    0x00002239

    PLEASE PLEASE help I donot know what to do. :(

    In case you'r wondering what those are, these are MIPS addresses and those give me headache. :twisted:

    6,675585
    Grand MasterGrand Master
    6,675585

      Nov 14, 2007#2

      Best regards from an UC/UE/UES for Windows user from Austria

      8

        Nov 15, 2007#3

        ULTRAEDIT THE BEST! :D

        Help:

        Can you post the FASTEST version below?
        I deal with 669956 lines. It's taking a long time.
        I donot need any logs. Also all lines are normal.

        and also the MOHI_RULES text not needed but I donot know how to edit the macro.

        Thanks!

          Nov 15, 2007#4

          ^^
          Request to developers:

          The macro takes a long time for even 10000 .

          The sort feature is ULTRA-FAST it takes just a few seconds but leaves behind one entry, because it's very optimized unlike the macros, they need to be interpreted.


          Could the developers perhaps add an option to totally remove Duplicates option into the Advanced Sort options, Plz? :lol:

          236
          MasterMaster
          236

            Nov 15, 2007#5

            If you have UE V12 or higher and use Perl Regular Expressions and check "Regular Expressions" in the "Replace" dialog, then you can use the following search text:

            Code: Select all

            ^(.*)\r\n\1\r\n$
            and "replace all" with nothing.

            This should be a lot faster than macros.

            This only works for duplicates, not triplicates or more.

            HTH,
            Tim

            29
            Basic UserBasic User
            29

              Nov 15, 2007#6

              That's not quite right. This should work (adjust the line endings if it's not a DOS/Windows file, and "replace all" with nothing):

              Code: Select all

              ^(.*\r\n)\1+

              236
              MasterMaster
              236

                Nov 16, 2007#7

                You're right, your regex works for triplicates, and mine doesn't. Yours is also much more elegant. Thanks. I'll edit the offending post...
                Tim