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

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

Expand Messages
  • Sheri
    ... to ChapterTwo , you get ... too much ... the ... haha, seems I have too many lines in my clip. Comment out the first and last lines and it sorts by Title
    Message 1 of 26 , Nov 8, 2002
    View Source
    • 0 Attachment
      --- In ntb-scripts@y..., h.paulissen@f... wrote:
      > Sheri,
      >
      > If you change one "ChapterOne" in your sample input
      to "ChapterTwo", you get
      > the sorting mixed up - I guess because you followed Jody's wording
      too much
      > - You sort on the numbers only... Where I sort on the beginning of
      the
      > lines... I don't know what Jody really needed.
      >
      > But it was fun to think of a way to get it done...
      >
      > Hugo

      haha, seems I have too many lines in my clip. Comment out the first
      and last lines and it sorts by Title as well as Chapter:Verse.

      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
    • Jody
      Hi Sheri, Hugo, Alec, and All, Thanks!!! Out of here. ... Happy Script n! Jody Adair UnSubscribe, Options mailto:ntb-Scripts-UnSubscribe@yahoogroups.com
      Message 2 of 26 , Nov 8, 2002
      View Source
      • 0 Attachment
        Hi Sheri, Hugo, Alec, and All,

        Thanks!!! Out of here.

        >Pretty curious, I agree. I was consistently getting that result with
        >your clip.


        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
      • Sheri
        Too late, but here s what I meant about saving the Row numbers. This message can be expanded at Yahoo to view and copy without broken lines.
        Message 3 of 26 , Nov 8, 2002
        View Source
        • 0 Attachment
          Too late, but here's what I meant about saving the Row numbers.

          This message can be expanded at Yahoo to view and copy without broken lines.


          H="SortedorNot_RegExp4Jody"
          ^!ClearVariables
          ^!Jump Doc_Start
          ^!Replace "\s*$" >> "" RSAW
          ^!Set %Curdoc%=^$GetDocIndex$
          ^!SetClipboard ^$StrTrim(^$GetText$)$
          ^!Menu Edit/Paste New
          ^!SetPasteIndent Off
          ^!ClearVariable %LN%
          ^!Destroydoc ^$GetAppPath$temp.otl
          ^!Jump Doc_Start
          :NumLines
          ^!Inc %LN%
          ^!If ^%LN%>^$GetLineCount$ Out
          ^!Select Line
          ^!Set %Row%=^$GetRow$
          ^!InsertSelect ^$StrFill(0;^$Calc(6-^$StrSize(^%Row%)$)$)$^%Row%#^$GetSelection$
          ^!Jump Select_Start
          ^!Jump +1
          ^!Goto NumLines
          :Out
          ^!Replace "{\d+}#{.*}" >> "H="\2"\n\1\n" RAWS
          ^!Jump Doc_Start
          ^!InsertText = V4 Outline MultiLine NoSorting TabWidth=30^P^P
          ^!Save As ^$GetAppPath$temp.otl
          ^!Close
          ^!Open ^$GetAppPath$temp.otl
          ^!Save
          ^!Set %OTL%=^$GetDocIndex$
          ^!Setdocindex ^%Curdoc%
          ^!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 ^$StrTrim(^$StrSort("^$GetText$";False;True;True)$)$
          ^!Replace "0*{[1-9]\d*}:0*{[1-9]\d*}" >> "\1:\2" AIRSW
          ^!Continue Ready: Sorted Output with Duplicates Removed.^%nl%OK Removes Sorting, Cancel Cancels.
          ^!SetHintInfo Working
          ^!SetScreenUpdate Off
          ^!Jump Doc_Start
          ^!ClearVariable %LN%
          :PutOnLineNumbers
          ^!Inc %LN%
          ^!If ^%LN%>^$GetLineCount$ Onward
          ^!Set %Line%=^$GetLine$
          ^!SetdocIndex ^%OTL%
          ^!ShowHeadings False
          ^!SetTopicIndex ^$GetTopicIndex(^%Line%)$
          ^!IFError Error
          ^!Set %LineNbr%=^$StrTrim(^$GetText$)$
          ^!SetdocIndex ^%Curdoc%
          ^!InsertText ^%LineNbr%^%Space%
          ^!Jump +1
          ^!Goto PutOnLineNumbers
          :Error
          ^!Info Error ^%Line% Not Found!!
          :Onward
          ^!Select All
          ^!InsertText ^$StrSort("^$GetText$";False;True;True)$
          ^!Replace "^\d+ " >> "" WARS
          ;end of clip
        • Alan C.
          Hello Everyone, The enclosed clips (they does sorts nicely I thought) works great/fast on each of the two small samples which are enclosed below the clips.
          Message 4 of 26 , Nov 9, 2002
          View Source
          • 0 Attachment
            Hello Everyone,

            The enclosed clips (they does sorts nicely I thought) works great/fast on each of the two small samples which are enclosed below the clips.

            cc'd to clips list also (so *Perl enthusiast* can see/correct my follies) :-) perhaps join ntb-scripts list if they so desire

            But if Jody's files are on the rather large side then, well these clip, by their design, use memory perhaps they're somewhat memory reliant (could swap to disk in such case whereby a different approach perhaps could be needed--if is too slow under these conditions, that is)

            Speaking of different approach . . . I had wanted to use a reply from my query on nntp.perl.org newsgroup, their beginners group. But I didn't, not yet, know how to integrate any of their replies with NoteTab. ??? help welcomed on this topic (ntb-scripts list I think)

            http://nntp.x.perl.org/group/perl.beginners/36762
            http://nntp.x.perl.org/group/perl.beginners/36764
            http://nntp.x.perl.org/group/perl.beginners/36765
            http://nntp.x.perl.org/group/perl.beginners/36770
            http://nntp.x.perl.org/group/perl.beginners/36785

            Welcome to toy with it, offer suggestions, ideas, alternatives.

            The if line in each Perl clip has regex that uses Perl lookaround or look ahead feature. (means it looks ahead of the digits to the *position* whereby at that position adjacent to the digit(s) there MUST be a colon) (no colon equals no match) This feature IS supported in Perl 5.8 on Linux. But it also seems to work fine on my Win 2k with the latest ActiveState Perl, though I didn't yet remove any colon from the sample and test to see what happen.

            5 clips in a row, 1 after the other, follow.

            H="NumSortrPl"
            ^!IfFileExist ^$GetPerlExe$ Next ELSE NoPerl
            ^!DeleteFile ^$GetAppPath$StdError.err
            ^!SetScreenUpdate OFF

            ^!RunPerl pl_numsnag1
            ^!Set %sel1%=^$StrSort("^$GetSelection$";False;True;True)$
            ^!Menu Edit/Undo
            ^!IfFileExist ^$GetAppPath$StdError.err ^!Clip is_err

            ^!RunPerl pl_numsnag2
            ^!Set %sel2%=^$StrSort("^$GetSelection$";False;True;True)$
            ^!Menu Edit/Undo
            ^!IfFileExist ^$GetAppPath$StdError.err ^!Clip is_err

            ^!RunPerl pl_numsnag3
            ^!InsertText ^$StrSort("^$GetSelection$";False;True;True)$
            ^!Jump DOC_START
            ^!InsertText ^%sel1%^%sel2%
            ^!IfFileExist ^$GetAppPath$StdError.err ^!Clip is_err
            ^!Goto end
            :NoPerl
            ^!Prompt Cannot execute this Clip without a Perl interpreter!

            H="_pl_numsnag1"
            #!/perl/bin/perl -w
            # numsnag1 snags lines. Uses criteria
            # filters/gets each line with 1: (\d:)
            while ($line = <>) {
            if ($line =~ m/\b\d(?=:)/) {
            print $line;
            }
            }


            H="_pl_numsnag2"
            #!/perl/bin/perl -w
            # numsnag2 snags lines. Uses criteria
            # filters/gets each line with 12: (\d\d:)
            while ($line = <>) {
            if ($line =~ m/\b\d\d(?=:)/) {
            print $line;
            }
            }


            H="_pl_numsnag3"
            #!/perl/bin/perl -w
            # numsnag3 snags lines. Uses criteria
            # filters/gets each line with 123: (\d\d\d:)
            while ($line = <>) {
            if ($line =~ m/\b\d\d\d(?=:)/) {
            print $line;
            }
            }


            H="_is_err"
            ; this clip 4/report any Perl errors
            ^!Open ^$GetAppPath$StdError.err
            ^!Prompt Perl has reported some errors!
            ^!DeleteFile ^$GetAppPath$StdError.err
            ^!GoTo End
            ; ----<end of clips

            begin sample 1 next line
            126:2
            13:15
            13:3
            14:3
            14:3
            141:3
            1:20
            15:11
            15:13
            15:18
            15:5-6
            15:6
            15:8
            140:3
            16:23
            16:27
            120:2
            16:4
            17:28
            18:7

            begin sample 2 next line
            Psalms 119:176
            Acts 1:20
            Luke 20:42
            Psalms 20:42
            Colossians 3:16
            Ephesians 5:19
            James 5:13
            Luke 24:44
            Psalms 150:6

            --
            Later. Alan.
          • Sheri
            Hi Alan, I struggled and finally got the following working -- uses a pm module called Sort::Fields. Sample is first sorted as I think Jody was wanting it
            Message 5 of 26 , Nov 9, 2002
            View Source
            • 0 Attachment
              Hi Alan,

              I struggled and finally got the following working -- uses a pm module
              called Sort::Fields. Sample is first sorted as I think Jody was
              wanting it (chapter and verse treated as numeric), then the
              duplicates are removed. I think I've found a Perl way of removing
              duplicate lines from an unsorted input, but haven't tried to
              implement it.

              Sheri

              Sample Input:
              ChapterOne 13:15
              ChapterOne 13:3
              ChapterOne 14: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
              ChapterOne 120:2
              ChapterTwo 126:2
              ChapterOne 140:3
              ChapterOne 141:3
              ChapterOne 14:3
              ChapterTwo 126:2
              ChapterOne 15:5-6

              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 140:3
              ChapterOne 141:3
              ChapterTwo 126:2

              H="_Perl Field Sorter and Dupe Remover"
              #all lines go in an array (memory intensive)
              @lines = <>; # Read entire file into an array
              use Sort::Fields;
              #first parameter is pattern for field delimiters
              @lines= fieldsort '[\s\:\-]', [1, '2n', '3n'], @lines;
              #next part extracts unique entries in a sorted array
              $prev = 'nonesuch';
              @lines = grep($_ ne $prev && (($prev) = $_), @lines);
              #finally, print array
              print @lines;

              H="Run Perl Sorter and Dupe Remover"
              ^!Jump Doc_Start
              ^!RunPerl Perl Field Sorter and Dupe Remover
            • Sheri
              Here s the Perl non-sorted removal of duplicate lines in an array: H= _Perl Remove Dupes without Sorting @in = ; undef %saw; @out = grep(!$saw{$_}++, @in);
              Message 6 of 26 , Nov 9, 2002
              View Source
              • 0 Attachment
                Here's the Perl non-sorted removal of duplicate lines in an array:

                H="_Perl Remove Dupes without Sorting"
                @in = <>;
                undef %saw;
                @out = grep(!$saw{$_}++, @in);
                print @out;

                H="Run Perl Remove Dupes without Sorting"
                ^!Jump Doc_Start
                ^!RunPerl Perl Remove Dupes without Sorting

                Same input as previous message gets this output:

                ChapterOne 13:15
                ChapterOne 13:3
                ChapterOne 14: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
                ChapterOne 120:2
                ChapterTwo 126:2
                ChapterOne 140:3
                ChapterOne 141:3

                Keep in mind, I found these solutions, but I don't particularly know
                why they work :D
              • Jody
                Hi Harv, ... For my Clips, the user doesn t need to know anything, well, they need to know how to execute a Clip. Once I get it all combined I ll post it
                Message 7 of 26 , Nov 19, 2002
                View Source
                • 0 Attachment
                  Hi Harv,

                  >> 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

                  >With either clip I wind up with a totally sorted, 1,600 line
                  >pasteboard file.
                  >
                  >Jody will be able to figure out what to do but it may be
                  >confusing to newer users.

                  For my Clips, the user doesn't need to know anything, well, they
                  need to know how to execute a Clip. <g> Once I get it all
                  combined I'll post it to the list. I still need to add a blank
                  line in between the sets of books. I think I can handle that, at
                  least 1 out of 3 times. <g>

                  So, in short, a word(s) and/or phrases are searched for via
                  Ransack. Since there will be duplicates found when searching for
                  THIS or THIS (apple + orange) they need to be removed and sorted
                  like the Clip above does, in a real numbering method. Then the
                  Clip to put it in biblical order is ran, and lastly add the blank
                  lines in between groups of books. That will all be done in one
                  Clip once I get it all sorted out.

                  Thanks much!
                  -jody
                • Jody
                  Hi Sheri, Hugo... ... Thanks for doing this for me. What I did not tell you so that it makes more sense to you now, is that it was fine if the *books* got out
                  Message 8 of 26 , Nov 19, 2002
                  View Source
                  • 0 Attachment
                    Hi Sheri, Hugo...

                    >> If you change one "ChapterOne" in your sample input to
                    >> "ChapterTwo", you get the sorting mixed up - I guess because
                    >> you followed Jody's wording too much You sort on the numbers
                    >> only... Where I sort on the beginning of the lines... I don't
                    >> know what Jody really needed.

                    Thanks for doing this for me.

                    What I did not tell you so that it makes more sense to you now,
                    is that it was fine if the *books* got out of order. Actually,
                    they already are out of order at this point in the process; just
                    in the Windows sorting. I already had the Clip made with the
                    array to put the books in Biblical order, so that is why I mainly
                    needed the chap:vs sorted. It's just that the chapter:verse
                    numbers were in Windows sorting instead of a real numerical
                    order.

                    I haven't looked at the Perl scripts yet, but hopefully will.
                    Then folks can have an option to download the huge Perl engine or
                    use NoteTab's code, or should I say Sheri's. ;) If another one
                    was made that worked, thanks. Sheri, I have to figure out why
                    your sorting clip to remove duplicates bring it up in an outline
                    does not change the text in the document. It deletes the doubles
                    but sorts the lines. The outline output does not. It is the one
                    you were showing the line number thing.

                    Anyhow, the following works; I just need to merge it and make
                    some adjustments as needed.

                    Thanks again!

                    >haha, seems I have too many lines in my clip. Comment out the first
                    >and last lines and it sorts by Title as well as Chapter:Verse.
                    >
                    >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


                    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
                  • Sheri
                    ... Hi Jody, Welcome back :) Are describing something it should do but isn t or something it does that you don t understand? This has been awhile ago, so bear
                    Message 9 of 26 , Nov 19, 2002
                    View Source
                    • 0 Attachment
                      --- In ntb-scripts@y..., Jody <av1611@e...> wrote:
                      > Sheri, I have to figure out why
                      > your sorting clip to remove duplicates bring it up in an outline
                      > does not change the text in the document. It deletes the doubles
                      > but sorts the lines. The outline output does not. It is the one
                      > you were showing the line number thing.

                      Hi Jody,

                      Welcome back :)

                      Are describing something it should do but isn't or something it does
                      that you don't understand?

                      This has been awhile ago, so bear with me. I do recall that that clip
                      gave two options for how the output would look. If you want one of
                      each you have to run it twice and save the two variations.

                      Regards,
                      Sheri
                    • Jody
                      Hi Sheri, ... Thx! ... I peeked at it again. One problem was you did not turn word wrap off in the copy you made. I have yet to figure out why you made
                      Message 10 of 26 , Nov 20, 2002
                      View Source
                      • 0 Attachment
                        Hi Sheri,

                        >> Sheri, I have to figure out why your sorting clip to remove
                        >> duplicates bring it up in an outline does not change the text
                        >> in the document. It deletes the doubles but sorts the lines.
                        >> The outline output does not. It is the one you were showing the
                        >> line number thing.
                        >
                        >Welcome back :)

                        Thx!

                        >Are describing something it should do but isn't or something it
                        >does that you don't understand?

                        I peeked at it again. One problem was you did not turn word wrap
                        off in the copy you made. I have yet to figure out why you made
                        temp.otl, but the text used as headers is correct, so I just need
                        to, oh, look at it some more. <g> I think I know what you were
                        doing off the top of my head, pre-guessing "you."

                        Thanks for your help. I'm pretty sure I can take it from here...

                        What I do not understand is when the lines are numbered appending
                        the number to the end of the file how that can remove dups w/o
                        sorting. Each line ends differently. Oh, I think it is coming
                        back now, hold on, yes... StrSize out to the end of the line w/o
                        the number. :) Claes G., Michael G., or Wayne VW showed me how
                        to do that a number of years ago. I know I have the Clip
                        somewhere amongst my zillions of them. <g>

                        If I remember correctly, I think your short RegExp Clip does it all correctly, but I will certainly learn again the NoSort, RemDups.

                        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
                      • Sheri
                        ... The sample I used had such short lines, word-wrap never occured to me :) ... temp.otl sounds like something I should have deleted at the end of the clip.
                        Message 11 of 26 , Nov 20, 2002
                        View Source
                        • 0 Attachment
                          --- In ntb-scripts@y..., Jody <av1611@e...> wrote:

                          > I peeked at it again. One problem was you did not turn word wrap
                          > off in the copy you made. I have yet to figure out why you made
                          > temp.otl, but the text used as headers is correct, so I just need
                          > to, oh, look at it some more. <g> I think I know what you were
                          > doing off the top of my head, pre-guessing "you."
                          >

                          The sample I used had such short lines, word-wrap never occured to
                          me :)

                          > What I do not understand is when the lines are numbered appending
                          > the number to the end of the file how that can remove dups w/o
                          > sorting. Each line ends differently. Oh, I think it is coming
                          > back now, hold on, yes... StrSize out to the end of the line w/o
                          > the number. :) Claes G., Michael G., or Wayne VW showed me how
                          > to do that a number of years ago. I know I have the Clip
                          > somewhere amongst my zillions of them. <g>

                          temp.otl sounds like something I should have deleted at the end of
                          the clip. It's coming back to me now. I saved the line numbers in an
                          outline, sorted the original file to remove duplicates, then
                          retrieved the line numbers from the outline so I could re-sort back
                          to the order it had prior to duplicates-removing sort. I doubt I used
                          any StrSize type tests.

                          Regards,
                          Sheri
                        • Jody
                          Hi Sheri, ... Oh, I got it. I understand the OTL now and why you made the full line the headers. That is an interesting method. I haven t seen it
                          Message 12 of 26 , Nov 20, 2002
                          View Source
                          • 0 Attachment
                            Hi Sheri,

                            >temp.otl sounds like something I should have deleted at the end
                            >of the clip. It's coming back to me now. I saved the line
                            >numbers in an outline, sorted the original file to remove
                            >duplicates, then retrieved the line numbers from the outline so I
                            >could re-sort back to the order it had prior to duplicates-
                            >removing sort.

                            Oh, I got it. I understand the OTL now and why you made the
                            full line the headers. <g> That is an interesting method. I
                            haven't seen it before.

                            >I doubt I used any StrSize type tests.

                            I had only glanced before. You did use it, but not for sorting;
                            instead for StrFill of the zeros.

                            ^!Select Line
                            ^!Set %Row%=^$GetRow$
                            ^!InsertSelect ^$StrFill(0;^$Calc(6-^$StrSize(^%Row%)$)$)$^%Row%#^$GetSelection$

                            Thanks for your time... ;)

                            See ya in the funnies!
                            Jody

                            ...he that is of a merry heart hath a continual feast...
                            http://www.clean-funnies.com

                            If you haven't laughed at yourself today,
                            you missed a good joke!
                          • Sheri
                            ... #^$GetSelection$ ... Hahaha I meant to ask you if I was allowing for enough line numbers lol. Regards, Sheri
                            Message 13 of 26 , Nov 20, 2002
                            View Source
                            • 0 Attachment
                              --- In ntb-scripts@y..., Jody <av1611@e...> wrote:

                              > ^!Select Line
                              > ^!Set %Row%=^$GetRow$
                              > ^!InsertSelect ^$StrFill(0;^$Calc(6-^$StrSize(^%Row%)$)$)$^%Row%
                              #^$GetSelection$
                              >

                              Hahaha

                              I meant to ask you if I was allowing for enough line numbers lol.

                              Regards,
                              Sheri
                            • Jody
                              Hi Sheri, I found a minor bug in your RegExp, sorting script. I ll post it a bit later once I get the rest of it going - but it might be awhile till I can get
                              Message 14 of 26 , Nov 22, 2002
                              View Source
                              • 0 Attachment
                                Hi Sheri,

                                I found a minor bug in your RegExp, sorting script. I'll post it
                                a bit later once I get the rest of it going - but it might be
                                awhile till I can get to it. Getting about 100-150 support
                                messages a day since the newsletters went out.

                                Found it quick enough. ;) I think it was the line above
                                the commented one needed to be split so that it did on the
                                left side of the colon first and then the right side. The
                                way it was it was not stripping the zeros from the right
                                side in front of numbers: :001...009. As in say Psalms 150:002,
                                Psalms 150:006 - should be 150:1[-6] Thanks again, Sheri. ;)
                                I'll have to find some time latter to crank up the Perl scripts
                                offered.

                                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

                                Reorder Chap:Verse
                                ^!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
                                ^$StrSort("^$GetText$";0;1;1)$
                                ^!Replace ":0+" >> ":" AIRSW
                                ^!Replace "0+{[1-9]\d*}:" >> "\1:" AIRSW

                                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
                              Your message has been successfully submitted and would be delivered to recipients shortly.