Re: Once upon a time?

2007-02-03 Thread Jim Ault
On 2/3/07 5:24 AM, "David Bovill" <[EMAIL PROTECTED]> wrote: >Now I wonder which will be fastest: >get wordOffset(word1, tText) >if (it > 0) AND (it = (wordOffset(word2, tText) - 1)) then >or > > put space into P > put replaceText("once upon a time&q

Re: Once upon a time?

2007-02-03 Thread David Bovill
That is a big difference! ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution

Re: Once upon a time?

2007-02-03 Thread Mark Smith
put replaceText("once upon a time","\s+",P) into cleanVar put P&"once upon"&P is in P&cleanVar&P = true ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsub

Re: Once upon a time?

2007-02-03 Thread David Bovill
Thanks guys! Now I wonder which will be fastest: get wordOffset(word1, tText) if (it > 0) AND (it = (wordOffset(word2, tText) - 1)) then or put space into P put replaceText("once upon a time","\s+",P) into cleanVar put P&"once u

Re: Once upon a time?

2007-02-02 Thread Jim Ault
t; <[EMAIL PROTECTED]> wrote: > put "once upon" is among the words of "once upon a time" = false (which > surprised me!) > > put "once,upon" is among the items of "once,upon,a,time" = true > > set the wholeMatches to true > set th

Re: Once upon a time?

2007-02-02 Thread Jim Ault
> put "once upon" is among the words of "once upon a time" = false (which > surprised me!) This shouldn't surprise you if you consider: put "apple,grape" is among the items of "apple,grape,pear" = false --since "apple,grape" is not an it

Re: Once upon a time?

2007-02-02 Thread Brian Yennie
If you need exactly two words, how about something like this: set the wholeMatches to true get wordOffset(word1, tText) if (it > 0) AND (it = (wordOffset(word2, tText) - 1)) then ... end if It seems wordOffset() will ignore multiple spaces for you. HTH, Brian

Once upon a time?

2007-02-02 Thread David Bovill
put "once upon" is among the words of "once upon a time" = false (which surprised me!) put "once,upon" is among the items of "once,upon,a,time" = true set the wholeMatches to true set the itemDelimiter to space put "once upon" is among the ite