Replace a string with other string using DXL

Hi,

I want to replace character in a string or substring in string with other string. 

for example 

string s = "value", for the string 's' I want to replace character 'e' with string 'es' so that the result will be(stored in other string variable)

string snew = "values"

I have been searching on the forum but being new to DXL I found solutions are bit complex and difficult to understand. Is there any function or method in DXL which will replace character in string with desired value.


Prashant7 - Tue Nov 15 07:26:19 EST 2016

Re: Replace a string with other string using DXL
DOORSHAM - Tue Nov 15 16:17:04 EST 2016

Only home grown solution exists for this.  

 

try this: https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014848521&ps=25

Re: Replace a string with other string using DXL
pommCannelle - Mon Nov 21 09:37:48 EST 2016

(

Hi ... 

You can developp your own functions ... but you have to deal properly with buffers to avoid the DOORS leak memory issues ...
Or you can use an external tool to avoid them ;)

I was pretty sure than i found this VBRegexps.inc in a previous post of this forum, but i can't find it ...
So i can't let the credit to his author ... and i'm really sorry for that :(
If someone find the source of the .inc ... let me know !

The functions are easy to use ... ;)

Enjoy !

)

 

 


Attachments

VBRegexps.inc