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

Re: [NTB] Need help - reformat text clip

Expand Messages
  • Don - HtmlFixIt.com
    Something like this ... ;clip by don AT htmlfixit DOT com ^!Replace ^(Matthew|Mark|Luke|John)(.*) r n(.*) r n [COLOR= DarkRed ]$3[/COLOR] -- $1$2 r n
    Message 1 of 9 , Feb 1, 2010
    • 0 Attachment
      Something like this ...
      ;clip by don AT htmlfixit DOT com
      ^!Replace "^(Matthew|Mark|Luke|John)(.*)\r\n(.*)\r\n" >>
      ""[COLOR="DarkRed"]$3[/COLOR]" -- $1$2\r\n" WARS

      westerman2010 wrote:
      > Need a clip to put referance at the end, wrap in quotation marks and wrap with color code formatting. I have 100s of these to do. Help would be appreciated.
      >
      > Thx Craig
      >
      >
      > Original format
      >
      > --
      >
      > Luke 24:44
      > And he said unto them, These are the words which I spake unto you, while I was yet with you, that all things must be fulfilled, which were written in the law of Moses, and in the prophets, and in the psalms, concerning me.
      >
      > Luke 24:46
      > And said unto them, Thus it is written, and thus it behooved Christ to suffer, and to rise from the dead the third day.
      >
      > --
      >
      > Altered format
      >
      > --
      >
      > "[COLOR="DarkRed"]And he said unto them, These are the words which I spake unto you, while I was yet with you, that all things must be fulfilled, which were written in the law of Moses, and in the prophets, and in the psalms, concerning me.[/COLOR]" -- Luke 24:44
      >
      > "[COLOR="DarkRed"]And said unto them, Thus it is written, and thus it behooved Christ to suffer, and to rise from the dead the third day.[/COLOR]" -- Luke 24:46
    • westerman2010
      I tried with and without selecting text. Nothing happens.
      Message 2 of 9 , Feb 1, 2010
      • 0 Attachment
        I tried with and without selecting text. Nothing happens.

        --- In notetab@yahoogroups.com, Alec Burgess <buralex@...> wrote:
        >
        > Craig:
        >
        > ^!replace "(\w+\x20\d+:\d+)\r\n(.*?)\r\n" >>
        > ""[COLOR="DarkRed"]$2"\x20--$1\r\n" rwsai
        >
        > above may line wrap -- its all one line. (note in above space char can
        > be used in place of \x20 - tend to use the hex format because its more
        > visible to reader)
        >
        > --
        > Regards ... Alec (buralex@gmail & WinLiveMess - alec.m.burgess@skype)
        >
      • westerman2010
        When I run this clip it inserts the text of the clip itself into the text at the cursor location.
        Message 3 of 9 , Feb 1, 2010
        • 0 Attachment
          When I run this clip it inserts the text of the clip itself into the text at the cursor location.

          --- In notetab@yahoogroups.com, "Don - HtmlFixIt.com" <don@...> wrote:
          >
          > Something like this ...
          > ;clip by don AT htmlfixit DOT com
          > ^!Replace "^(Matthew|Mark|Luke|John)(.*)\r\n(.*)\r\n" >>
          > ""[COLOR="DarkRed"]$3[/COLOR]" -- $1$2\r\n" WARS
          >
        • westerman2010
          Got it to work. If there is no carrage return (line break) at the end of the text nothing happens. If I go to end of text with cursor, then hit enter, then run
          Message 4 of 9 , Feb 1, 2010
          • 0 Attachment
            Got it to work. If there is no carrage return (line break) at the end of the text nothing happens. If I go to end of text with cursor, then hit enter, then run clip, it runs.

            Thanks Craig

            --- In notetab@yahoogroups.com, Alec Burgess <buralex@...> wrote:
            >
            > Craig:
            >
            > ^!replace "(\w+\x20\d+:\d+)\r\n(.*?)\r\n" >>
            > ""[COLOR="DarkRed"]$2"\x20--$1\r\n" rwsai
            >
            > --
            > Regards ... Alec (buralex@gmail & WinLiveMess - alec.m.burgess@skype)
            >
          • Alec Burgess
            westerman2010 (westerman@cableone.net) wrote (in part) (on 2010-02-01 ... You had me wondering there what was going on ... your examples had -- separators
            Message 5 of 9 , Feb 1, 2010
            • 0 Attachment
              westerman2010 (westerman@...) wrote (in part) (on 2010-02-01
              at 19:32):
              > Got it to work. If there is no carrage return (line break) at the end
              > of the text nothing happens. If I go to end of text with cursor, then
              > hit enter, then run clip, it runs.
              >
              > Thanks Craig
              >
              > --- In notetab@yahoogroups.com, Alec Burgess <buralex@...> wrote:
              > > >
              > > > Craig:
              > > >
              > > > ^!replace "(\w+\x20\d+:\d+)\r\n(.*?)\r\n" >>
              > > > ""[COLOR="DarkRed"]$2"\x20--$1\r\n" rwsai

              You had me wondering there what was going on ... your examples had "--"
              separators in between them so I hadn't attempted to make it "safe" at
              end-of-file.

              If you change the trailing \r\n in the find clause to optional ie:
              (?:\r\n)? it should work either way. (Note the 'w' in 'rwsai' options
              means process start of file not from cursor. Selected or not selected
              would only be relevant if an 'h' option were include (eg rwsaih)

              so clip becomes (again it will wrap in Yahoo):
              H="work test"
              ^!replace "(\w+\x20\d+:\d+)\r\n(.*?)(?:\r\n)" >>
              ""[COLOR="DarkRed"]$2"\x20--$1\r\n" rwsai

              btw: interesting that Don's solution focused on subject knowledge (names
              of the Gospels) while mine focused on the format of numeric identifier.
              I haven't tested his but assume it works too :-)

              --
              Regards ... Alec (buralex@gmail & WinLiveMess - alec.m.burgess@skype)




              [Non-text portions of this message have been removed]
            • Don - HtmlFixIt.com
              I m wondering if Craig had the clips wrapped ... the command is all on one line. I was going off of some prior bible work we did around here and if I remember
              Message 6 of 9 , Feb 1, 2010
              • 0 Attachment
                I'm wondering if Craig had the clips wrapped ... the command is all on
                one line.

                I was going off of some prior bible work we did around here and if I
                remember correctly some citations did not follow that data format ... so
                I figured books might be the safer bet.

                Alec Burgess wrote:
                > westerman2010 (westerman@...) wrote (in part) (on 2010-02-01
                > at 19:32):
                >> Got it to work. If there is no carrage return (line break) at the end
                >> of the text nothing happens. If I go to end of text with cursor, then
                >> hit enter, then run clip, it runs.
                >>
                >> Thanks Craig
                >>
                >> --- In notetab@yahoogroups.com, Alec Burgess <buralex@...> wrote:
                >> > >
                >> > > Craig:
                >> > >
                >> > > ^!replace "(\w+\x20\d+:\d+)\r\n(.*?)\r\n" >>
                >> > > ""[COLOR="DarkRed"]$2"\x20--$1\r\n" rwsai
                >
                > You had me wondering there what was going on ... your examples had "--"
                > separators in between them so I hadn't attempted to make it "safe" at
                > end-of-file.
                >
                > If you change the trailing \r\n in the find clause to optional ie:
                > (?:\r\n)? it should work either way. (Note the 'w' in 'rwsai' options
                > means process start of file not from cursor. Selected or not selected
                > would only be relevant if an 'h' option were include (eg rwsaih)
                >
                > so clip becomes (again it will wrap in Yahoo):
                > H="work test"
                > ^!replace "(\w+\x20\d+:\d+)\r\n(.*?)(?:\r\n)" >>
                > ""[COLOR="DarkRed"]$2"\x20--$1\r\n" rwsai
                >
                > btw: interesting that Don's solution focused on subject knowledge (names
                > of the Gospels) while mine focused on the format of numeric identifier.
                > I haven't tested his but assume it works too :-)
                >
              • Don - HtmlFixIt.com
                Alec, if you don t include the ^ at the start, then you will find the citations again on a re-run and things will be all out of whack, I think ...
                Message 7 of 9 , Feb 1, 2010
                • 0 Attachment
                  Alec, if you don't include the ^ at the start, then you will find the
                  citations again on a re-run and things will be all out of whack, I think ...

                  Alec Burgess wrote:
                  > westerman2010 (westerman@...) wrote (in part) (on 2010-02-01
                  > at 19:32):
                  >> Got it to work. If there is no carrage return (line break) at the end
                  >> of the text nothing happens. If I go to end of text with cursor, then
                  >> hit enter, then run clip, it runs.
                  >>
                  >> Thanks Craig
                  >>
                  >> --- In notetab@yahoogroups.com, Alec Burgess <buralex@...> wrote:
                  >> > >
                  >> > > Craig:
                  >> > >
                  >> > > ^!replace "(\w+\x20\d+:\d+)\r\n(.*?)\r\n" >>
                  >> > > ""[COLOR="DarkRed"]$2"\x20--$1\r\n" rwsai
                  >
                  > You had me wondering there what was going on ... your examples had "--"
                  > separators in between them so I hadn't attempted to make it "safe" at
                  > end-of-file.
                  >
                  > If you change the trailing \r\n in the find clause to optional ie:
                  > (?:\r\n)? it should work either way. (Note the 'w' in 'rwsai' options
                  > means process start of file not from cursor. Selected or not selected
                  > would only be relevant if an 'h' option were include (eg rwsaih)
                  >
                  > so clip becomes (again it will wrap in Yahoo):
                  > H="work test"
                  > ^!replace "(\w+\x20\d+:\d+)\r\n(.*?)(?:\r\n)" >>
                  > ""[COLOR="DarkRed"]$2"\x20--$1\r\n" rwsai
                  >
                  > btw: interesting that Don's solution focused on subject knowledge (names
                  > of the Gospels) while mine focused on the format of numeric identifier.
                  > I haven't tested his but assume it works too :-)
                  >
                Your message has been successfully submitted and would be delivered to recipients shortly.