Count instances of replace with replace command

David Kwinter david at kwinter.ca
Sun May 4 17:51:01 EDT 2003


On 5/4/03 3:26 PM, "Sannyasin Sivakatirswami" <katir at hindu.org> wrote:

> is it possible to count the number instances handled when issuing
> 
> replace "old" with "new" in someText
> 
> the result returns empty.
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution


I may be wrong, but I don't think revolution does that, but you can do it
yourself.

Try:



put "text to replace" into old

put myData into myTempData
replace old with return&old&return in myTempData
filter myTempData with old

put the number of lines in myTempData into instancesBeingReplaced

replace old with "new" in myData




More information about the use-livecode mailing list