words in Transcript

Robert Brenstein rjb at robelko.com
Sun May 22 06:03:58 EDT 2005


>JB has suggested:
>
>set the wholematches to false
>put wordoffset("called","make sure the closeField is called, as follows:")
>
>  ---> returns 6
>
>But ...
>
>set the wholematches to false
>put wordoffset("print","make sure the closeField is printed, as follows:")
>
>  ---> returns 6 too,
>
>
>yet ... "Printed" is not the word "print".
>
>From a syntactic point of view a word is a word 
>even when it is trailed by , . - : ; ? !
>
>so I vote for Klaus Major's proposal ("is among the tokens of ....")
>
>Vielen Dank, Klaus!
>
>Ton

Melitón, this is correct in this case: by setting 
whole matches off, you tell Rev that partial 
matches are okay and print is a substring of 
printed. Such a search will find print, 
printable, printed, printing, prints, misprint, 
etc, thus allowing you to look for a word 
regardless of the grammatical or flexical form. 
It will also find print, and print. and print? or 
print! that is a word with punctuation marks. If 
you want exact match, set whole matches on :)

Robert


More information about the use-livecode mailing list