I am trying to replace single quote in a string with double quote using replace function with data factory expressions.
For example, replace single quote in the following string
hello'world ---> hello''world
@replace(pipeline().parameters.tst,''','''')
The above code is not working. Need help in fixing the code
You can declare a new parameter with the value '
(single quote). You can look at the following demonstration for reference.
text
with the value hello'world
and replace_char
with the value '
.set variable
activity to store the output of the replace()
function (for demonstration) into variable named output
(String). Now, I modified the value as:@replace(pipeline().parameters.text,pipeline().parameters.replace_char,'"')
NOTE: The \
in the output
variable value indicates that the "
is to be considered as a character inside the string value.