How to find and replace

Phil Davis davis.phil at comcast.net
Mon Jun 6 18:00:56 EDT 2005


Assuming I understand the problem... try including word delimiters in 
both the replaced and the replacing text:

   get the clickText
   put underscores(length(it)) into tChars -- func makes "__" string
   put space & it & space into tBad
   put space & tChars & space into tGood
   replace tBad with tGood in fld 1


function underscores pCount
   repeat (pCount)
     put "_" after tString
   end repeat
   return tString
end underscores


Phil Davis



Christian Langers wrote:
> Hello list...
> 
> I think this has been asked many times, but i did not find any  
> satisfying answer...
> 
> I need to do the following :
> 
> repeat with x=1 to the number of chars of the clicktext+5
>     put "_" after char x of tChar
>     end repeat
> 
> replace the clicktext with tChar in fld 1
> 
> where i want the exact word to be replaced...
> 
> e.g.  I click  "da" and I just want this to be replaced in the field  
> (not  "das", "Dach","Dame",...)
> 
> How can I solve this ?
> 
> 
> Thanks in advance,
> 
> 
> Christian
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 


More information about the use-livecode mailing list