0

I have a string with double quotes for example:

"Diagnosed with "Covid19 -Ve"

while rendering in MEL variable it's failing.

My string may contains multiple double quotes in future.

How to escape if string contains all the double quotes in entire string value at the end in MEL

Peyman Mohamadpour
  • 17,954
  • 24
  • 89
  • 100

1 Answers1

0

you can escape the double quotes character using a backslash and then the double quotes. Just like this:

myVariable = "Diagnosed with \"Covid19 -Ve" ;
Inazense
  • 1,517
  • 3
  • 18
  • 28
  • Hi Inazense. thanks for the response. but here my string value is coming from database. Not sure how many double quotes exists in that string. is there any c# equivalent .Replace() such kind of method available in MEL to escape double quotes at the end? – new_learner1 Jun 02 '20 at 09:49
  • Hi, yes. You can use the strReplace(str inputString, str selectString, str replaceString) method. It will return a string with the values replaced by the new ones. – Inazense Jun 02 '20 at 10:48