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
2
Answers
You can declare a new parameter with the value
'
(single quote). You can look at the following demonstration for reference.text
with the valuehello'world
andreplace_char
with the value'
.set variable
activity to store the output of thereplace()
function (for demonstration) into variable namedoutput
(String). Now, I modified the value as:NOTE: The
in the
output
variable value indicates that the"
is to be considered as a character inside the string value.Use two single quotes to escape a ‘ character in string functions.
For example, expression
@concat('Baba', '''s ', 'book store')
will return below result.https://learn.microsoft.com/en-us/azure/data-factory/control-flow-expression-language-functions#escaping-single-quote-character