Hello; I am having trouble with REPLACE.
From the user guide:
REPLACE("alabama mama", "a","x",3,5)
will replace only three occurrences of string "a" starting at position 5. The result is "alabxmx mxma".
----------------
Have tried many variations, but have not been able to get it to work?
This should work, yes?
doda="qwhertyuhioplkjhgfdsah"
x="h"
y="m"
REPLACE(doda,x,y)
Where every occurrence of h is replaced with m. Thanks
---------
ok, I found out how to use it.
print REPLACE("alabama mama", "a","x",3,5)
will replace only three occurrences of string "a" starting at position 5.
The result "alabxmx mxma" is printed.
--------------
my example:
doda="qwhertyuhioplkjhgfdsah"
x="h"
y="m"
newdat=REPLACE(doda,x,y)
print REPLACE(doda,x,y)
print newdat
gives:
qwmertyumioplkjmgfdsam
qwmertyumioplkjmgfdsam
I am really glad this works as I need to filter
a few files.