Loading ...
Sorry, an error occurred while loading the content.

144Re: [NTS] Re: Sorting Numbers and No-Sort: Remove Dups/Trips...

Expand Messages
  • Jody
    Nov 7, 2002
    • 0 Attachment
      Hi Hugo and Sheri,

      I'm shutting down for awhile and will have to look at later.

      I'm not sure what yours was suppose to do Sheri. It appeared to remove
      dups, but changed the sorting. Thanks! I think I know how to do the append line number to the end of the line, but I don't understand how that would remove dups.

      >Jody, I suspect you have the first line wrong, 12 comes after 10...

      Yes, my mess up. The Clip does not work though. Nice try. Perl is OK if that is easier.

      120:2
      126:2
      13:15
      13:3
      14:3
      14:3
      140:3
      141:3
      15:11
      15:13
      15:18
      15:5-6
      15:6
      15:8
      16:23
      16:27
      16:4
      17:28
      18:7

      >> I'm getting ready to leave town tomorrow for a bit. I've been
      >> trying to think of the best way to do sorting of numbers like the
      >> following:
      >>
      >> 12:5
      >> 1:2
      >> 1:21
      >> 2:20
      >> 2:24
      >> 10:17
      >> 120:135
      >> etc. so that they are in a true numerical order and
      >> **not** a Windows number sort order like this:
      >
      >Would this do the trick? Was very fasst and I tested with the above
      >examples only. It may offend with other "1:123" type of strings (if
      >present)...
      >
      >^!SetScreenUpdate OFF
      >^!Jump 1
      >:LOOP
      >^!Find "\d+:\d+" RS
      >^!IfError SORT
      >^!Replace "{\d}" >> "\1@" RAH
      >^!GoTo LOOP
      >:SORT
      >^!Select ALL
      >^!Menu Modify/Lines/Sort/Ascending
      >;^$StrSort("^$GetSelection$";False;True;True)$
      >^!Replace "{\d}@" >> "\1" RAW


      Happy Script'n!
      Jody Adair

      UnSubscribe, Options
      mailto:ntb-Scripts-UnSubscribe@yahoogroups.com
      http://groups.yahoo.com/group/ntb-scripts

      The NoteTabbers Assistant Page
      http://www.notetab.net
    • Show all 26 messages in this topic