Regex (matchChunk) help...
Mike Bonner
bonnmike at gmail.com
Fri Jun 15 13:21:05 EDT 2018
Try this..
on mouseup
local tCharOffset
--set the text of field 1 to the text of field 1
put the text of field 1 into tText
put "beginning" into tstartword -- string begin
put "ending" into tEndword -- string end
put 1 into tCounter -- tracks current word
repeat for each trueword tWord in tText
switch tWord
case tStartword
put tCounter into tPair
break
case tEndword
if tPair is not empty then
put tPair & comma & tCounter & cr after tPairs
end if
break
end switch
add 1 to tcounter
end repeat
delete the last char of tPairs
repeat for each line tLine in tPairs
set the textcolor of trueword (item 1 of tLine) to (item 2 of tLine)
of field 1 to "blue"
end repeat
end mouseup
On Fri, Jun 15, 2018 at 11:03 AM Glen Bojsza via use-livecode <
use-livecode at lists.runrev.com> wrote:
> Mike, I believe that you are correct in understanding what I am trying to
> extract.
>
> I will need a bit more time to work through your solution.
>
> regards,
>
> Glen
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list