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

Re: [Clip] Quick question regarding olding and multiple items..

Expand Messages
  • Axel Berger
    ... You should have asked much earlier! ... I assume that last empty line is already present. Then try: ^!Replace ^P ^P WAS ^!Replace ^( d{3} .)
    Message 1 of 6 , May 2, 2009
    • 0 Attachment
      Silverleaf wrote:
      > I still have another 2000 entries to do

      You should have asked much earlier!

      > [b]234.[b] Conduct PC Check:[br]
      > • Success: See 296.[br]
      > • Failure: No Event[br]
      > [br]

      I assume that last empty line is already present. Then try:

      ^!Replace "^P" >> "<br>^P" WAS
      ^!Replace "^(\d{3}\.)" >> "<b>$1<b>" WRAS

      I assume here that you use a NoteTab version of at least 5.0. If not
      the second line needs to be modified a bit. For those two commands
      you do not even need the clip. The search and replace in the menue
      would let you replace ^P by <br>^P and then, in regular expression
      mode, ^(\d{3}\.) by <b>$1<b>

      The tedium of what you have already done must have been terrible.

      Axel
    • John Shotsky
      I d use regular expressions, and prevent the double tags. ;Add To the front of the numbered sections only ^!Replace ^( d{3} .) $1 ARTSW ;Add
      Message 2 of 6 , May 2, 2009
      • 0 Attachment
        I'd use regular expressions, and prevent the double <b> tags.
        ;Add <Br> To the front of the numbered sections only
        ^!Replace "^(\d{3}\.)" >> "<b>$1" ARTSW
        ;Add <b> to the end of every line
        ^!Replace "\R" >> "<br>\n" ARTSW

        John
        From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Axel Berger
        Sent: Saturday, May 02, 2009 2:38 PM
        To: ntb-clips@yahoogroups.com
        Subject: Re: [Clip] Quick question regarding <b>olding and <BR> multiple items..





        Silverleaf wrote:
        > I still have another 2000 entries to do

        You should have asked much earlier!

        > [b]234.[b] Conduct PC Check:[br]
        > . Success: See 296.[br]
        > . Failure: No Event[br]
        > [br]

        I assume that last empty line is already present. Then try:

        ^!Replace "^P" >> "<br>^P" WAS
        ^!Replace "^(\d{3}\.)" >> "<b>$1<b>" WRAS

        I assume here that you use a NoteTab version of at least 5.0. If not
        the second line needs to be modified a bit. For those two commands
        you do not even need the clip. The search and replace in the menue
        would let you replace ^P by <br>^P and then, in regular expression
        mode, ^(\d{3}\.) by <b>$1<b>

        The tedium of what you have already done must have been terrible.

        Axel



        [Non-text portions of this message have been removed]
      • Silverleaf
        ... LoL - Didn t know this place existed. 8) Many thanks for the quick reply, as I really appreciate it. ... ^!Replace ^P ^P WAS ^!Replace
        Message 3 of 6 , May 2, 2009
        • 0 Attachment
          --- Axel Berger <Axel-Berger@...> wrote:

          > You should have asked much earlier!

          LoL - Didn't know this place existed. 8)

          Many thanks for the quick reply, as I really appreciate it.

          >
          > > [b]234.[b] Conduct PC Check:[br]
          > > • Success: See 296.[br]
          > > • Failure: No Event[br]
          > > [br]
          >
          > I assume that last empty line is already present. Then try:

          ^!Replace "^P" >> "<br>^P" WAS
          ^!Replace "^(\d{3}\.)" >> "<b>$1<b>" WRAS


          Um, I'm not following what I'm supposed to do with this text. I've used Note Tab for 6 or 7 years and just used it as a text/html editor, and haven't the foggiest idea where this is added.

          If I'm following this text - I'm supposed to exchange P with BR? There are no P's to begin. To reiterate, when I type a text block in to Note Tab, it looks exactly like this:

          994.
          • If US soldiers are in sight, but none is west of the L hex column, go to Condition 4.
          • If US soldiers are in sight and north of the 9 hex row, go to Condition 3.
          • Otherwise, see 825.

          No html formatting is there to begin - then - I go back in and slowly go through and add in each bolded identifier (<b>..</b>) then go through and add in line breaks <br> at the end of each line.

          A completed example (within NoteTab) looks exactly like this when finished:

          <b>994.</b><br>

          • If US soldiers are in sight, but none is west of the L hex column, go to Condition 4.<br>

          • If US soldiers are in sight and north of the 9 hex row, go to Condition 3.<br>

          • Otherwise, see 825.<br>
          <br>

          I apologize for any confusion this may cause.



          > I assume here that you use a NoteTab version of at least 5.0. If not
          > the second line needs to be modified a bit. For those two commands
          > you do not even need the clip. The search and replace in the menue
          > would let you replace ^P by <br>^P and then, in regular expression
          > mode, ^(\d{3}\.) by <b>$1<b>


          It's version 4.95


          >
          > The tedium of what you have already done must have been terrible.
          >


          Been an absolute nightmare, and though I'm close to being finished, there is a ton left to do. *sigh*

          Cheers and thanks again,
        • Alec Burgess
          Silverleaf (r_silverleaf@yahoo.com) wrote (in part) (on 2009-05-02 at ... First - update your (free) 4.x version of Notetab Lite to the current 5.x version of
          Message 4 of 6 , May 2, 2009
          • 0 Attachment
            Silverleaf (r_silverleaf@...) wrote (in part) (on 2009-05-02 at
            18:29):
            > > > [b]234.[b] Conduct PC Check:[br]
            > > > " Success: See 296.[br]
            > > > " Failure: No Event[br]
            > > > [br]
            > >
            > > I assume that last empty line is already present. Then try:
            >
            > ^!Replace "^P" >> "<br>^P" WAS
            > ^!Replace "^(\d{3}\.)" >> "<b>$1<b>" WRAS
            >
            > Um, I'm not following what I'm supposed to do with this text. I've
            > used Note Tab for 6 or 7 years and just used it as a text/html
            > editor, and haven't the foggiest idea where this is added.
            >
            > If I'm following this text - I'm supposed to exchange P with BR?
            > There are no P's to begin.
            First - update your (free) 4.x version of Notetab Lite to the current
            5.x version of Notetab Lite
            There are some changes which you probably won't notice immediately
            though you might find it interesting to browse through the "what's new"
            file which will automatically be displayed when you first run Notetab.

            The ^P's Axel refers to are tokens which represent the new-line
            separator between lines in a txt (or html) file.
            They can be used in the Find/Replace dialog in Notetab or in Clips
            (scripts which execute a set of Notetab commands)

            The two commands that Axel gave you are intended to be put in a clip and
            executed against a selection of text.

            the first can be executed in the Find/Replace dialog by putting "^P"
            (w/o) quotes in Find field and "<br>^P" (again w/o quotes) in the
            Replace field. This will put a <br> at the end of all lines in the text
            you have selected or all lines in file if nothing is selected.

            The second uses a regular expression. To do it in Find/Replace dialog
            tick [x] Regular Exp. and put "^(\d{3}\.)" and "<b>$1<b>" in Find and
            Replace fields (again w/o quotes).

            Note: in your current version this will not work as you want - some
            changes to the syntax of regular expression were made in the upgrade to
            the 5.x version were made.

            The Find field says look for all occurrences of three digits followed by
            a period and replace them by the same thing surrounded by <b> and </b>.
            btw: I think Axel had a typo in what he gave ... the second <b> should
            of course be </b> instead :-)

            This should get you started.
            If you want to create your own clips start in Notetab HELP file and look
            for the Clip Basics" topic in the index.
            Note if you want to try the regular expression in your current Notetab
            4.95 the equivalent Find and Replace fields are:
            "{\d\d\d\.}" and "<b>\1</b"

            If you want to figure out how and why this does what it does, look in
            the Help for Regular expressions in your current version - but I
            strongly recommend the upgrade to Notetab 5.

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




            [Non-text portions of this message have been removed]
          • Sheri
            ... ...but keep in mind that unlike in the current version (5.8), regular expression processing in 4.95 was slow and prone to crash on a large document.
            Message 5 of 6 , May 3, 2009
            • 0 Attachment
              --- In ntb-clips@yahoogroups.com, Alec Burgess <buralex@...> wrote:

              > Note if you want to try the regular expression in your current
              > Notetab 4.95 the equivalent Find and Replace fields are:
              > "{\d\d\d\.}" and "<b>\1</b"

              ...but keep in mind that unlike in the current version (5.8), regular expression processing in 4.95 was slow and prone to crash on a large document.

              Regards,
              Sheri
            Your message has been successfully submitted and would be delivered to recipients shortly.