On Jul 6, 2013, at 8:05 PM, Mark Rauterkus wrote:
> Desired result is to remove all the text starting with "Prior data:" and
> ending with "Concludes prior."
put fld "performance" into tText
put offset("Prior data: ", tText) into startChar
put offset("Concludes prior.",tText) + 15 into endChar
put newData into char startChar to endChar of tText
put tText into fld "performance"
This assumes you want to replace the "prior data: and the "Concludes prior."
phrases as well. If you want to keep those words and just replace what is
between them, do:
put fld "performance" into tText
put offset("Prior data: ", tText) + 11 into startChar
put offset("Concludes prior.",tText) -1 into endChar
put newData into char startChar to endChar of tText
put tText into fld "performance"
Easier yet if you have the "Prior data:" and "Concludes prior." on separate
lines, with the data between them -- then use the lineoffset() function.
Is this the kind of thing you want?
-- Peter
Peter M. Brigham
[email protected]
http://home.comcast.net/~pmbrig
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode