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

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

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

      --- In ntb-scripts@y..., Jody <av1611@e...> wrote:
      > 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.

      I apologize Jody, I seem to have pasted the wrong code in last night.
      The /w's should have been /W and the 0+ 's should have been 0*

      It probably still doesn't do what you want, but look and see. I
      haven't looked at yours yet Hugo, will do so in a bit.

      Sample Input:

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

      Sample Output:

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

      H="FixedRegExp4Jody"
      ^!Replace "{\W+}\s{\d+:\d+}" >> "\2\s\1" AIRSW
      ^!Replace "{\d+}:{\d+}" >> "00\1:00\2\s" AIRSW
      ^!Replace "\d*{\d\d\d}:\d*{\d\d\d}\s" >> "\1:\2" AIRSW
      ^!Select All
      ^!InsertText ^$StrSort("^$GetText$";False;True;True)$
      ^!Replace "0*{[1-9]\d*}:0*{[1-9]\d*}" >> "\1:\2" AIRSW
      ^!Replace "{\d+:\d+}\s{\W+}" >> "\2\s\1" AIRSW
      ;end of clip
    • Show all 26 messages in this topic