cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
akshara
Level 5

How to find & replace exact matches?

Hello,

I have string like this.

STRING string1 = "abc abcde dfgabc";

i want to replace abc (only the exact match) with 123.
i tried with strreplace, but it replaces all the occurances.

how can i do it in installscript ? any idea?

Thanks,
Akshara
Labels (1)
0 Kudos
(3) Replies
akshara
Level 5

pls let me know if any idea?
0 Kudos
mask_sd
Level 3

Hi

Maybe you can try it out,

Create the users custom function.
Use basic functions like StrGetTokens to the String separated by delimiters i.e. ' '(Space) and by comparing it with the StrCompare and Append the Strings to obtain result.
0 Kudos
akshara
Level 5

thanks..i implemented in the same way.
0 Kudos