Position allows you to specify where in the text the search is to start. You don’t need to use Replace string: just start searching from the last found position+1.
Jeremy Jeremy Roussak j...@mac.com > On 4 May 2017, at 17:58, John Baughman via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Quick and dirty ideas… > > $text:="Now is the time for all good men to come to the aid of their country" > ARRAY TEXT($aWords;0) > GET TEXT KEYWORDS($text;$aWords) > $wordCount:=Count in array($aWords;"The") > > COPY ARRAY($text;$textTest) > $characterCount:=0 > While (Position("e";$textTest)>0) > $characterCount:=$count+1 > $characterCount:=Replace string($textTest;"e";"";1) > End while > > > John > ********************************************************************** > 4D Internet Users Group (4D iNUG) > FAQ: http://lists.4d.com/faqnug.html > Archive: http://lists.4d.com/archives.html > Options: http://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ********************************************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************