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

Text reformat clip #2

Expand Messages
  • westerman2010
    Alec I ve been using the clip you did and it is saving sooo much time. Thanks again. Thanks to Don also. Need another clip. The way we are doing it is very
    Message 1 of 6 , Feb 2, 2010
    • 0 Attachment
      Alec I've been using the clip you did and it is saving sooo much time. Thanks again. Thanks to Don also.

      Need another clip. The way we are doing it is very awkward. Need to grab last name on each line. Print in reverse order under original text, separated by a comma except for last two names get a "and" between them.


      raw text

      http://www.xyz.com/swift.html|Gulliver's Travels - Swift
      http://www.xyz.com/austin.html|Pride and Prejudice - Austen
      http://www.xyz.com/decervantes.html|Don Quixote - de Cervantes
      http://www.xyz.com/dickens.html|Oliver Twist - Dickens
      http://www.xyz.com/hawthorne.html|The Scarlet Letter - Hawthorne
      http://www.xyz.com/melville.html|Moby-Dick - Melville


      reformatted

      http://www.xyz.com/swift.html|Gulliver's Travels - Swift
      http://www.xyz.com/austin.html|Pride and Prejudice - Austen
      http://www.xyz.com/decervantes.html|Don Quixote - de Cervantes
      http://www.xyz.com/dickens.html|Oliver Twist - Dickens
      http://www.xyz.com/hawthorne.html|The Scarlet Letter - Hawthorne
      http://www.xyz.com/melville.html|Moby-Dick - Melville

      Melville, Hawthorne, Dickens, de Cervantes, Austen and Swift
    • Don - HtmlFixIt.com
      just need to add the space ;clip by don AT htmlfixit DOT com ;http://www.xyz.com/swift.html|Gulliver s Travels - Swift ^!Jump Doc_Start ^!SetArray
      Message 2 of 6 , Feb 2, 2010
      • 0 Attachment
        just need to add the space

        ;clip by don AT htmlfixit DOT com
        ;http://www.xyz.com/swift.html|Gulliver's Travels - Swift
        ^!Jump Doc_Start
        ^!SetArray %authors%=^$GetDocMatchAll("^.* - (.+)";1)$
        ^!Info [C]^%authors%
        ^!Jump Doc_End
        ^!InsertText ^P
        :Loop
        ^!InsertText ^%authors^%authors0%%
        ^!If "^%authors0%" <> "2" comma ELSE and
        :comma
        ^!InsertText ,
        ^!Goto LoopCont
        :and
        ^!InsertText and
        ^!Goto LoopCont
        :LoopCont
        ^!Dec %authors0%
        ^!If "^%authors0%" = "0" End ELSE Loop

        westerman2010 wrote:
        > Alec I've been using the clip you did and it is saving sooo much time. Thanks again. Thanks to Don also.
        >
        > Need another clip. The way we are doing it is very awkward. Need to grab last name on each line. Print in reverse order under original text, separated by a comma except for last two names get a "and" between them.
        >
        >
        > raw text
        >
        > http://www.xyz.com/swift.html|Gulliver's Travels - Swift
        > http://www.xyz.com/austin.html|Pride and Prejudice - Austen
        > http://www.xyz.com/decervantes.html|Don Quixote - de Cervantes
        > http://www.xyz.com/dickens.html|Oliver Twist - Dickens
        > http://www.xyz.com/hawthorne.html|The Scarlet Letter - Hawthorne
        > http://www.xyz.com/melville.html|Moby-Dick - Melville
        >
        >
        > reformatted
        >
        > http://www.xyz.com/swift.html|Gulliver's Travels - Swift
        > http://www.xyz.com/austin.html|Pride and Prejudice - Austen
        > http://www.xyz.com/decervantes.html|Don Quixote - de Cervantes
        > http://www.xyz.com/dickens.html|Oliver Twist - Dickens
        > http://www.xyz.com/hawthorne.html|The Scarlet Letter - Hawthorne
        > http://www.xyz.com/melville.html|Moby-Dick - Melville
        >
        > Melville, Hawthorne, Dickens, de Cervantes, Austen and Swift
        >
        >
        >
        >
        >
        > ------------------------------------
        >
        > Fookes Software: http://www.fookes.com/
        > NoteTab website: http://www.notetab.com/
        > NoteTab Discussion Lists: http://www.notetab.com/groups.php
        >
        > ***
        > Yahoo! Groups Links
        >
        >
        >
        >
      • Don - HtmlFixIt.com
        Okay here you go ... ;clip by don AT htmlfixit DOT com ;http://www.xyz.com/swift.html|Gulliver s Travels - Swift ^!Jump Doc_Start ^!SetArray
        Message 3 of 6 , Feb 2, 2010
        • 0 Attachment
          Okay here you go ...
          ;clip by don AT htmlfixit DOT com
          ;http://www.xyz.com/swift.html|Gulliver's Travels - Swift
          ^!Jump Doc_Start
          ^!SetArray %authors%=^$GetDocMatchAll("^.* - (.+)";1)$
          ^!Jump Doc_End
          ^!InsertText ^P
          :Loop
          ^!InsertText ^%authors^%authors0%%
          ^!If "^%authors0%" = "1" End
          ^!If "^%authors0%" <> "2" comma ELSE and
          :comma
          ^!InsertText ,^%SPACE%
          ^!Goto LoopCont
          :and
          ^!InsertText ^%SPACE%and^%SPACE%
          ^!Goto LoopCont
          :LoopCont
          ^!Dec %authors0%
          ^!Goto Loop
          ;line 20

          As a separate aside, GetDocMatchAll has a problem ... I cannot anchor to
          the line end.
          dollar sign $ dollar sign $
          Dollar sign is an anchor that matches at
          the end of the subject string or right
          before the string-ending newline


          If I used that in the above ...
          ^!SetArray %authors%=^$GetDocMatchAll("^.* - (.+)$";1)$

          It gives an error. I don't think it should.

          westerman2010 wrote:
          > Alec I've been using the clip you did and it is saving sooo much time. Thanks again. Thanks to Don also.
          >
          > Need another clip. The way we are doing it is very awkward. Need to grab last name on each line. Print in reverse order under original text, separated by a comma except for last two names get a "and" between them.
          >
          >
          > raw text
          >
          > http://www.xyz.com/swift.html|Gulliver's Travels - Swift
          > http://www.xyz.com/austin.html|Pride and Prejudice - Austen
          > http://www.xyz.com/decervantes.html|Don Quixote - de Cervantes
          > http://www.xyz.com/dickens.html|Oliver Twist - Dickens
          > http://www.xyz.com/hawthorne.html|The Scarlet Letter - Hawthorne
          > http://www.xyz.com/melville.html|Moby-Dick - Melville
          >
          >
          > reformatted
          >
          > http://www.xyz.com/swift.html|Gulliver's Travels - Swift
          > http://www.xyz.com/austin.html|Pride and Prejudice - Austen
          > http://www.xyz.com/decervantes.html|Don Quixote - de Cervantes
          > http://www.xyz.com/dickens.html|Oliver Twist - Dickens
          > http://www.xyz.com/hawthorne.html|The Scarlet Letter - Hawthorne
          > http://www.xyz.com/melville.html|Moby-Dick - Melville
          >
          > Melville, Hawthorne, Dickens, de Cervantes, Austen and Swift
          >
          >
          >
          >
          >
          > ------------------------------------
          >
          > Fookes Software: http://www.fookes.com/
          > NoteTab website: http://www.notetab.com/
          > NoteTab Discussion Lists: http://www.notetab.com/groups.php
          >
          > ***
          > Yahoo! Groups Links
          >
          >
          >
          >
        • westerman2010
          Don I tried it on several different blocks of text and it worked PERFECTLY every time. Thank you. Much appreciated. Is it possible to select a few lines within
          Message 4 of 6 , Feb 2, 2010
          • 0 Attachment
            Don

            I tried it on several different blocks of text and it worked PERFECTLY every time. Thank you. Much appreciated.

            Is it possible to select a few lines within the text and do the same thing, but instead of printing below, copy to the clipboard?

            Craig


            --- In notetab@yahoogroups.com, "Don - HtmlFixIt.com" <don@...> wrote:
            >
            > Okay here you go ...
            > ;clip by don AT htmlfixit DOT com
            > ;http://www.xyz.com/swift.html|Gulliver's Travels - Swift
            > ^!Jump Doc_Start
            > ^!SetArray %authors%=^$GetDocMatchAll("^.* - (.+)";1)$
            > ^!Jump Doc_End
            > ^!InsertText ^P
            > :Loop
            > ^!InsertText ^%authors^%authors0%%
            > ^!If "^%authors0%" = "1" End
            > ^!If "^%authors0%" <> "2" comma ELSE and
            > :comma
            > ^!InsertText ,^%SPACE%
            > ^!Goto LoopCont
            > :and
            > ^!InsertText ^%SPACE%and^%SPACE%
            > ^!Goto LoopCont
            > :LoopCont
            > ^!Dec %authors0%
            > ^!Goto Loop
            > ;line 20
            >
            > As a separate aside, GetDocMatchAll has a problem ... I cannot anchor to
            > the line end.
            > dollar sign $ dollar sign $
            > Dollar sign is an anchor that matches at
            > the end of the subject string or right
            > before the string-ending newline
            >
            >
            > If I used that in the above ...
            > ^!SetArray %authors%=^$GetDocMatchAll("^.* - (.+)$";1)$
            >
            > It gives an error. I don't think it should.
          • Sheri
            ... Use ^%dollar% -- Clip discussion s/b on the clips list. Regards, Sheri
            Message 5 of 6 , Feb 2, 2010
            • 0 Attachment
              --- In notetab@yahoogroups.com, "Don - HtmlFixIt.com" <don@...> wrote:

              > As a separate aside, GetDocMatchAll has a problem ... I cannot
              > anchor to the line end.

              Use ^%dollar% --
              <http://tech.groups.yahoo.com/group/ntb-clips/message/20154>

              Clip discussion s/b on the clips list.

              Regards,
              Sheri
            • Don - HtmlFixIt.com
              Holy cow I had no idea we weren t on the clips list ... sorry everybody :-) Since the question was a follow up and prior question was a clip made a bold
              Message 6 of 6 , Feb 2, 2010
              • 0 Attachment
                Holy cow I had no idea we weren't on the clips list ... sorry everybody :-)
                Since the question was a follow up and prior question was a clip made a
                bold assumption.

                Good to know about the dollar variable being used in this instance ...
                still seems a bit quirky, but at least I know.

                Copying to the clips list now for all follow up discussion by me and
                hopefully others.

                Sheri wrote:
                > --- In notetab@yahoogroups.com, "Don - HtmlFixIt.com" <don@...> wrote:
                >
                >> As a separate aside, GetDocMatchAll has a problem ... I cannot
                >> anchor to the line end.
                >
                > Use ^%dollar% --
                > <http://tech.groups.yahoo.com/group/ntb-clips/message/20154>
                >
                > Clip discussion s/b on the clips list.
                >
                > Regards,
                > Sheri
              Your message has been successfully submitted and would be delivered to recipients shortly.