Re: replacing only exact matches in script

2019-08-07 Thread Alex Tweedly via use-livecode
On 07/08/2019 20:10, Dr. Hawkins via use-livecode wrote: I’m finally writing my new version of dependency calculation for database variables, with a supposedly clever easy format fo entry and machine calculated script. I need to replace only exact true words, though. So I need to be able t

Re: replacing only exact matches in script

2019-08-07 Thread hh via use-livecode
> Richard H. wrote: > I need to replace only exact true words, though. > So I need to be able to take an input string such as >5*pay - 2*monthlypay > and be able to replace “pay" with >getVal(pay,,,debtor) > without replacing monthlypay. You could try the following (works for me). Put a

Re: replacing only exact matches in script

2019-08-07 Thread Dr. Hawkins via use-livecode
On Aug 7, 2019, at 1:05 PM, Bob Sneidar via use-livecode wrote: > > Again, this is probably better handled with database queries. The catch is that I’m doing this to *build* those queries (or, actually, to invoke a combination)! the combination I mentioned would cause another value to be cal

Re: replacing only exact matches in script

2019-08-07 Thread Bob Sneidar via use-livecode
Again, this is probably better handled with database queries. But looking at your example, wouldn't it be simpler to replace "*" with space & "*" & space, and likewise with everything not a-z A-Z including cr, lf, etc? Now you have a guarantee that wholematches will work with words. Bob S >

replacing only exact matches in script

2019-08-07 Thread Dr. Hawkins via use-livecode
I’m finally writing my new version of dependency calculation for database variables, with a supposedly clever easy format fo entry and machine calculated script. I need to replace only exact true words, though. So I need to be able to take an input string such as 5*pay - 2*monthlypay and