|
Do you have RPG xTools? If so, use the FindReplace() function. The full helptext for it is at this URL: http://www.rpgxtools.com/Helptext/findreplace.html This would work: eval myVar = FindReplace('%OBJ%' : 'SOMEOBJ' : myVar ) -Bob Cozzi www.RPGxTools.com RPG xTools - Enjoy programming again. -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of brian Sent: Saturday, February 18, 2006 5:47 PM To: rpg400-l@xxxxxxxxxxxx Subject: substring replacement I want to do substring replacement so that a string like "Blah blah %LIB%/%OBJ%" turns into "Blah blah SOMELIB/SOMEOBJ". That is, I want to replace tokens like %LIB% with other strings of unknown/different lengths. I could use %subst, but then I think I'd have to specify a length, so the resulting string might look bad, like "Blah blah A /B".
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.