Matchtext to find a series of words
JimAultWins at yahoo.com
Wed Nov 29 22:33:08 CST 2006
> I meant a single pass for each block. The filter solution has to make a
> new pass through the text for each word we want to filter on. But
> regardless, it still shows very well in my tests.
Actually, the filter pass does not have to make a new pass through *ALL* of
Since I wrote it to work on the same variable successively, if the first
filter command does not find a match, the next two work on an empty
variable. Quite fast.
If it does find matching lines, the successive commands work only on the hit
text, thus optimizing by elimination.
The last email I sent shows that if you make each block a single line by
replacing the cr's, then concatenating the next block, you can make a single
pass for each word for all blocks at ONCE. If there are no matches for the
first word, then the following words are filtering an empty variable.
By tagging each line with a header as you concatenate, you can even tell
which lines (blocks) meet all the criteria without any speed difference
since the residual variable will contain only hits.
The slowest would obviously be the 'all three words found in all the blocks'
Glad you are having fun
On 11/29/06 6:02 PM, "J. Landman Gay" <jacque at hyperactivesw.com> wrote:
> Jim Ault wrote:
>> On 11/29/06 3:37 PM, "J. Landman Gay" <jacque at hyperactivesw.com> wrote:
>>> This looks promising, thanks. It looks like there is no single-pass
>>> method, but since filter is pretty fast it may do okay. I didn't even
>>> quote your regex explanation, I don't want to touch it. :)
>> You mention single pass...
>> Question: Single pass of what?
>> Single pass of each text block or all text blocks together?
More information about the use-livecode