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 Ponce uponP is in PcleanVarP = true
replaceText(once upon a time,\s+,P) into cleanVar
put Ponce uponP is in PcleanVarP = true
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http
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
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,\s+,P) into cleanVar
put Ponce uponP is in PcleanVarP
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 items of once upon a time = true
but with 2 spaces:
set
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
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 item, it is two of them
--just as once upon is not a word
If you want
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 the itemDelimiter to space
put once upon is among the items of once upon a time = true
but with 2