[NTB] Re: macros versus script (here we go again)
- --- In firstname.lastname@example.org, Marcelo de Castro Bastos
>>While it wasn't clear to the rest of the world, these are the same
>> 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."
thing to me. ;-)
In NoteTab 5.x Clipcode for some processes is now significantly slower
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. ;-)
- thanks larry.
where can i find out more about regexp?
lm_hamilton <lmh@...> wrote:
--- In email@example.com, hsavage wrote:
> teachyes10 wrote:
> > --- In firstname.lastname@example.org, "teachyes10" wrote:
> >> can somebody start this code for me?
> >> sorry. newbie.
> 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
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.
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]
- --- In email@example.com, q q <teachyes10@...> wrote:
>There is the regexp help file included with NoteTab. I believe it
> thanks larry.
> where can i find out more about regexp?
> lm_hamilton <lmh@...> wrote:
> --- In firstname.lastname@example.org, hsavage wrote:
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.