Using replaceAll in a string to replace gives an error

0
Hi  In a SAP interface in a descriptionfield i get a x's as a return. In the Jsonmapping after the REST it breaks because of the ‘ When using replaceAll($description, '’’,'-’) is gives an error because Mendix sees the ‘ as a “breakpoint” error is : no viable alternative at input ”)’ When i replace the ‘ for a – it works fine.
asked
3 answers
2

You should be able to ‘escape’ the quote sign with another quote sign. 

replaceAll($description, '''', '-')

Reference

answered
1

Hi Andrea,

You can do this with a single quote. A single quote escapes single quote:
https://forum.mendix.com/link/questions/88832

So: replaceAll($description, '’’’, '-’)

Hope this helps!

answered
2

Thanks both, It works like a charm!

answered