I have an API response which contains rn. I am not able to replace it by using replace(string, ‘rn’, ”). It does not work for it. When I use replace(string, ‘r’, ”) it replaced every word which contains r except r. Do you have any solution?
I have an API response which contains rn. I am not able to replace it by using replace(string, ‘rn’, ”). It does not work for it. When I use replace(string, ‘r’, ”) it replaced every word which contains r except r. Do you have any solution?
2
Answers
I've done it by using replace(string, decodeUriComponent(%0D%0A'), '')
The approach provided by @inspiredd works. The following is the reason why replacing
rn
does not work in pipeline expression builder.rn
. I have taken this response from look up for demonstration.@replace(activity('Lookup1').output.value[0].error,'rn','')
in set variable, it won’t give expected output because, in the pipeline activity json, the dynamic content will be considered as\r\n
instead.You can simply edit this pipeline JSON to simply use
rn
instead of\r\n
.This will change the dynamic content as shown below: