my first response was a bit terse...
If you need to retain source text length (and relative position of the
shorter 'seg' texts)
$Replacement:=char(256)*7
$New_Text:=Replace string($source;"Segment";$Replacement)
$Loc:=0
Repeat
$Loc:=position("Seg";$New_Text;$Loc+1)
if ($Loc>0)
do whatever need to be done
end if
until ($Loc = 0)
IF the above action modified the text, and you then need to replace the
the word 'segment' back into the text
$Final_Text:=replace string($New_Text;$Replacement;"Segment")
On Fri, 27 Oct 2017 20:07:18 +0100, Peter Mew via 4D_Tech wrote:
> Hi
> If I have a document, that has both the word "seg" and the word "segment",
> is there a way I can find the positions of just the word "seg"
> I can look at the character following "seg" to see if its an "m", but I
> wondered if there was a more direct route.
> thanks
> -pm
> **********************************************************************
> 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:[email protected]
> **********************************************************************
---------------
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing
**********************************************************************
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:[email protected]
**********************************************************************