SC, Rev,and RB speed test

Dar Scott dsc at
Sat Apr 17 20:46:32 EDT 2004

If the search criterial is interpreted as a search for a sequence of 
words, then extra spaces, punctuation and line ends should not have any 
influence on the result.  Also, partial words should not match.

On Saturday, April 17, 2004, at 06:23 AM, David Vaughan wrote:

> repeat with i = 33 to 47
>   replace NumToChar(i) in whateverText with space
> end repeat -- and so on

A normalized sequence of words can be created with a single 
replaceText() application.  That can put a single space between each 

This can be applied to the search text and the phrase.

There is also the problem of matching partial words.  Consider...

ground coffee swim

... selling underground coffee swimming suits ...

One way to handle this with the brute force method and the above 
normalization is to put a space at the front and back of each phrase 
and the text if one is not already there.

One advantage of the above full normalization method is that it does 
not affect operations done many times to or with the text.

Dar Scott

More information about the Use-livecode mailing list