whole(string) is in a fld

PEChumbley at aol.com PEChumbley at aol.com
Tue Jun 12 14:07:20 CDT 2007


 
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.runrev.com/pipermail/metacard/attachments/20070612/819614fb/attachment.html


More information about the metacard mailing list