How about something like this:
 
  put "This is a test." into myLine
  replace " " with "*" in myLine
  put fld 1 into myField
  replace ". " with ".#" in myField (note : period + space. use  two spaces 
if needed)
  replace space with "*" in myField
  replace "#" with space in myField
  if myLine is among the words of myField then return true
 
 
Philip Chumbley


I am  trying to write a function that returns whether a given phrase  exists  
in a field as whole words.

e.g.
put "This is a test." into fld 1  (note the punctuation)

whole("This is a tes",fld 1)  = FALSE  
whole("This is a test",fld 1) = TRUE.

A bit like trying to get the  line "This is a tes" is among the words of fld  
1 to work (obviously  it doesn't), even assuming no punctuation were  
involved!

I've  returned to this little conundrum many times over the years but have   
yet to solve it.

Any offers?

/H


 



************************************** See what's free at http://www.aol.com.
_______________________________________________
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard

Reply via email to