Selecting text using REGEX

Alex Rice alex at mindlube.com
Sun Sep 28 18:28:00 EDT 2003


On Sunday, September 28, 2003, at 05:05  PM, J. Landman Gay wrote:

> For an easy "trim" function that is just as fast as regex, try this:
>
>   return word 1 to -1 of pText
>
> In a test using text with 1000 leading white space characters and 500 
> trailing characters, the difference between the regex method and the 
> above one-liner was one millisecond.

Nice one- thanks Jacqueline. That's one's so concise it's hardly worth 
putting it into a separate function. No wonder transcript doesn't have 
a trim() function built in :-)

Alex Rice <alex at mindlube.com> | Mindlube Software | http://mindlube.com

what a waste of thumbs that are opposable
to make machines that are disposable  -Ani DiFranco




More information about the use-livecode mailing list