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

[NTB] Re: macros versus script (here we go again)

Expand Messages
  • lm_hamilton
    ... While it wasn t clear to the rest of the world, these are the same thing to me. ;-) In NoteTab 5.x Clipcode for some processes is now significantly slower
    Message 1 of 18 , Sep 25, 2007
    • 0 Attachment
      --- In notetab@yahoogroups.com, Marcelo de Castro Bastos
      <mcblista@...> wrote:
      >>
      >> Interviewed by CNN on 25/9/2007 10:53, lm_hamilton told the world:
      >>
      >> I see now that I will have to give up on clipcode for some things
      >> and dig into regexp.
      >>
      >It's not so much "giving up clips for regexps" than "leveraging
      > regexps WITHIN CLIPS."

      While it wasn't clear to the rest of the world, these are the same
      thing to me. ;-)

      In NoteTab 5.x Clipcode for some processes is now significantly slower
      than RegExp.

      I do not have to rely on Perl to do it, I can do it in NoteTab and get
      great results. Rather than complex looping, and tests, etc. with
      clipcode, I can do a simple ^!Replace with the desired RegExp, and if
      simple enough, just use the Search and Replace dialog.

      I agree with Don, I need an upgrade to be better at RegEx. ;-)

      Larry Hamilton
    • q q
      thanks larry. where can i find out more about regexp? teach ... This is so much faster than my old clip, that I will not post it. I had a clip I developed in
      Message 2 of 18 , Oct 1, 2007
      • 0 Attachment
        thanks larry.
        where can i find out more about regexp?
        teach

        lm_hamilton <lmh@...> wrote:
        --- In notetab@yahoogroups.com, hsavage wrote:
        >
        > teachyes10 wrote:
        > > --- In notetab@yahoogroups.com, "teachyes10" wrote:
        > >> can somebody start this code for me?
        > >> sorry. newbie.
        >
        > teach,
        >
        > If spaces and digits similar to your example start at the left
        > margin execute the following.

        This is so much faster than my old clip, that I will not post it. I
        had a clip I developed in 4.95 that did not use regexp. It took about
        15 minutes on 1000 lines.

        To make a clip work, I found that starting on the right and going left
        was easiest to preserve the position numbers. Going from the left
        required incrementing the length of the line. There were probably
        better ways to do it, but never had the time to refine it.

        I kludged together a perl script that takes a few seconds. I then
        modify the perl script into a new script for each new file I need to
        modify.

        Using the example and regexp here in NoteTab 5.41, 1,000 and 10,000
        lines are changed in a flash.

        I kept going and 100,000 lines took maybe 2 or 3 seconds.

        I then did 1 million lines and it took 19 seconds counting "one
        thousand one", etc.

        I am sure that certain regexp patterns would not be this fast, but I
        see now that I will have to give up on clipcode for some things and
        dig into regexp.

        Larry Hamilton



        Fookes Software: http://www.fookes.com/
        The NoteTab Clips List: http://groups.yahoo.com/group/ntb-clips/
        The NoteTab Off Topic List: http://groups.yahoo.com/group/ntb-offtopic/

        Yahoo! Groups Links






        ---------------------------------
        Yahoo! oneSearch: Finally, mobile search that gives answers, not web links.

        [Non-text portions of this message have been removed]
      • lm_hamilton
        ... There is the regexp help file included with NoteTab. I believe it points to some other resources. I am sure a quick Google search will find lots of
        Message 3 of 18 , Oct 2, 2007
        • 0 Attachment
          --- In notetab@yahoogroups.com, q q <teachyes10@...> wrote:
          >
          > thanks larry.
          > where can i find out more about regexp?
          > teach
          >
          > lm_hamilton <lmh@...> wrote:
          > --- In notetab@yahoogroups.com, hsavage wrote:
          There is the regexp help file included with NoteTab. I believe it
          points to some other resources.

          I am sure a quick Google search will find lots of information.

          There are several good beginner's guides online. I do not have the
          link handy to one I have used. I believe I got the link from one of
          the NoteTab lists.

          Larry Hamilton
        Your message has been successfully submitted and would be delivered to recipients shortly.