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

Re: [Clip] Add a to every line, clip needed

Expand Messages
  • gunnisonbirder
    ... Hello, I have tried above clip and can t make it work? Is it because I am using notetab pro ver: 5.61? Above clip was originally written in 2005. I
    Message 1 of 16 , Apr 5, 2009
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "dacystorm" <dacy.storm@...> wrote:
      >
      > Thankyou for the clip, but when i run it, it adds the <BR> to the end
      > of every line. I want the <BR> to be added in the beginning of every line.
      >
      > --- In ntb-clips@yahoogroups.com, hsavage <hsavage@p...> wrote:
      > >
      > > dacystorm wrote:
      > > > Hello, this should be easy... (maybe)
      > > >
      > > > I need a clip that adds <BR> to every line of the document.
      > > > Not replacing the existing text, just adding the <BR>.
      > > >
      > > > Help much appreciated, thanx
      > >
      > > This assumes there might be a few lines you don't want <br> added,
      > e.g.,
      > > html header lines.
      > >
      > > Just select one line or many lines in a group and run the clip, if you
      > > want lower or upper case change the clip accordingly by deleting or
      > > commenting out the other Replace line.
      > >
      > > -------------------------
      > > H="Add <br>"
      > > ; select one line or many lines you wish to add the suffix to.
      > > ; run clip
      > > ^!Replace "{\n+}" >> "<br>\1" HRSA
      > > ^!Replace "{\n+}" >> "<BR>\1" HRSA
      > > -------------------------
      > >
      > > ºvº
      > > 05.12.28
      > > 'Meandering to a different drummer.'
      > > hrs > hsavage@p...
      > >
      >
      Hello, I have tried above clip and can't make it work? Is it because I am using notetab pro ver: 5.61? Above clip was originally written in 2005. I would like a clip to add <br> to end of every line with some blank lines which I would also like to add <br> Thanks for any suggestions.
    • Axel Berger
      ... Yes it is, that clip is in the old syntax. The following is untested but ought to work: H= Add ; select one line or many lines you wish to add the
      Message 2 of 16 , Apr 6, 2009
      • 0 Attachment
        gunnisonbirder wrote:
        > Is it because I am using notetab pro ver: 5.61?

        Yes it is, that clip is in the old syntax. The following is untested
        but ought to work:

        H="Add <br>"
        ; select one line or many lines you wish to add the suffix to.
        ; run clip
        ^!Replace "(\R)" >> "<br>$1" HRSA

        Axel
      • Don Daugherty
        ... How about this: ^!Replace ^ RHSA
        Message 3 of 16 , Apr 6, 2009
        • 0 Attachment
          gunnisonbirder wrote:
          >> when i run it, it adds the <BR> to the end
          >> of every line. I want the <BR> to be added in the beginning of every line.
          How about this: ^!Replace "^" >> "<br>" RHSA
        • Axel Berger
          ... No, the caret on its own means nothing. This ought to work: ^!Replace ^(.+?)$ $1 HRAS It only looks for lines with a content of at least one
          Message 4 of 16 , Apr 6, 2009
          • 0 Attachment
            Don Daugherty wrote:
            > How about this: ^!Replace "^" >> "<br>" RHSA

            No, the caret on its own means nothing. This ought to work:

            ^!Replace "^(.+?)$" >> "<br>$1" HRAS

            It only looks for lines with a content of at least one character, not
            empty ones. For the latter case use

            ^!Replace "^(.*?)$" >> "<br>$1" HRAS

            instead.
            Axel
          • Sheri
            ... Better go back to regex school. :D Regards, Sheri
            Message 5 of 16 , Apr 6, 2009
            • 0 Attachment
              --- In ntb-clips@yahoogroups.com, Axel Berger <Axel-Berger@...> wrote:
              >
              > Don Daugherty wrote:
              > > How about this: ^!Replace "^" >> "<br>" RHSA
              >
              > No, the caret on its own means nothing.

              Better go back to regex school. :D

              Regards,
              Sheri
            • Axel Berger
              ... If you say so, I d better take heed. Thanks for the correction Axel
              Message 6 of 16 , Apr 6, 2009
              • 0 Attachment
                Sheri wrote:
                > Better go back to regex school. :D

                If you say so, I'd better take heed.

                Thanks for the correction
                Axel
              • gunnisonbirder
                ... This works great! Thanks!
                Message 7 of 16 , Apr 6, 2009
                • 0 Attachment
                  --- In ntb-clips@yahoogroups.com, Axel Berger <Axel-Berger@...> wrote:
                  >
                  > gunnisonbirder wrote:
                  > > Is it because I am using notetab pro ver: 5.61?
                  >
                  > Yes it is, that clip is in the old syntax. The following is untested
                  > but ought to work:
                  >
                  > H="Add <br>"
                  > ; select one line or many lines you wish to add the suffix to.
                  > ; run clip
                  > ^!Replace "(\R)" >> "<br>$1" HRSA
                  >
                  > Axel
                  >

                  This works great! Thanks!
                • Bert Byfield
                  Here s what I ended up with (uses a choice of prefixes): Insert Prefix to Lines 2 ; this one leaves empty lines alone: ; ^!Replace ^(.+)$
                  Message 8 of 16 , Apr 6, 2009
                  • 0 Attachment
                    Here's what I ended up with (uses a choice of prefixes):

                    Insert Prefix to Lines 2
                    ; this one leaves empty lines alone:
                    ; ^!Replace "^(.+)$" >> "^?[(T=C;H=6)Prefix to Insert is
                    =_!|//|rem|;|'|^T]$1" HRAS
                    ; this one inserts the prefix on empty lines too:
                    ^!Replace "^(.*)$" >> "^?[(T=C;H=6)Prefix to Insert is
                    =_!|//|rem|;|'|^T]$1" HRAS

                    (The Replace lines are split by my mail program)
                  Your message has been successfully submitted and would be delivered to recipients shortly.