Selecting text using REGEX

Mark Brownell gizmotron at earthlink.net
Sun Sep 28 14:47:00 EDT 2003


On Sunday, September 28, 2003, at 11:39  AM, Alex Rice wrote:

> I believe you it's faster in this case, but regex is usually faster 
> than one might think. It is after all calling an optimized C library 
> to do all the work :-)

Alex

What is more surprising to me is how fast offset() is in Revolution. 
It's almost as fast as the TextChuncher Xtra for Director. TextChuncher 
Xtra was based on parts of C's string class and was written in C. It 
has a findAll() function that returns a numbered array of all instances 
found.

Whenever you can extract or parse information without using a repeat 
loop it really speeds things up. I would love a transcript findAll() 
kind of offset function that does it all in the C library and returns 
it all in a numbered keyed array. This could be highly useful for 
creating indexes on the fly.

Mark




More information about the use-livecode mailing list