Re: Matchtext to find a series of words

2006-11-29 Thread Jim Ault
> 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 the text. Since I wrote it

Re: Matchtext to find a series of words

2006-11-29 Thread J. Landman Gay
Jim Ault wrote: On 11/29/06 3:37 PM, "J. Landman Gay" <[EMAIL PROTECTED]> 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 sing

Re: Matchtext to find a series of words

2006-11-29 Thread Mark Smith
On 30 Nov 2006, at 00:31, Brian Yennie wrote: You just need to pass through the text once, and "cross off" each word as you find it. If everything is crossed off when you're done, then you're done =). That's a much better idea than mine, so: function aMatch pWords,tText -- first remove p

Re: Matchtext to find a series of words

2006-11-29 Thread Dick Kriesel
On 11/29/06 4:31 PM, "Brian Yennie" <[EMAIL PROTECTED]> wrote: > I do think that algorithmically > one-pass is definitely possible. You just need to pass through the > text once, and "cross off" each word as you find it. If everything is > crossed off when you're done, then you're done =). Good i

Re: Matchtext to find a series of words

2006-11-29 Thread Jim Ault
On 11/29/06 3:37 PM, "J. Landman Gay" <[EMAIL PROTECTED]> 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... Que

Re: Matchtext to find a series of words

2006-11-29 Thread Brian Yennie
This looks promising, thanks. It looks like there is no single-pass method, but since filter is pretty fast it may do okay. Not sure how robust my stab was, but I do think that algorithmically one-pass is definitely possible. You just need to pass through the text once, and "cross off" each

Re: Matchtext to find a series of words

2006-11-29 Thread J. Landman Gay
Jim Ault wrote: I would tackle this using the filter command replace cr with tab in textStr set the wholematches to true filter textStr with "*"& token1&"*" filter textStr with "*"& token2&"*" filter textStr with "*"& token3&"*" if textStr is empty then return false else return true A better

Re: Matchtext to find a series of words

2006-11-29 Thread Jim Ault
On 11/29/06 1:26 PM, "J. Landman Gay" <[EMAIL PROTECTED]> wrote: > I need a matchtext/regex that will find a series of words in a block of > text, no matter whether they are together or not, and ignoring carriage > returns. For example: > > See if all of these words: dog cat dinosaur > > are in

Re: Matchtext to find a series of words

2006-11-29 Thread Ken Ray
On 11/29/06 3:26 PM, "J. Landman Gay" <[EMAIL PROTECTED]> wrote: > I need a matchtext/regex that will find a series of words in a block of > text, no matter whether they are together or not, and ignoring carriage > returns. For example: > > See if all of these words: dog cat dinosaur > > are in

Matchtext to find a series of words

2006-11-29 Thread J. Landman Gay
I need a matchtext/regex that will find a series of words in a block of text, no matter whether they are together or not, and ignoring carriage returns. For example: See if all of these words: dog cat dinosaur are in this text: "The purple dinosaur inadvertently stepped on the cat. The white do

Matchtext to find a series of words

2006-11-29 Thread J. Landman Gay
I need a matchtext/regex that will find a series of words in a block of text, no matter whether they are together or not, and ignoring carriage returns. For example: See if all of these words: dog cat dinosaur are in this text: "The purple dinosaur inadvertently stepped on the cat. The white