Usage of replaceAll function

1
Hi Team, I have one requirement that, I need to remove certain characters from my String. Hence I am using replaceAll function call. I want to remove ‘(‘,’)’ and ‘-’ that appears in my String. I could achieve it as below. replaceAll(replaceAll(replaceAll($Contact,'\)',''),'\(',''),'-','') and is working. But I dont want to use replaceAll multiple times, so is there any solution to achieve this.    Regards Ajay
asked
2 answers
2

replaceAll takes a regular expression in the second parameter, so you can do this in one call.
 

replaceAll($Contact, '[\(\)\-]', '')

https://docs.mendix.com/refguide/string-function-calls#13-replaceall

Hope this helps.

answered
0

try to put your code ekstra two \\ sings

$replaceAll($ReqBody,'\\*','')

Hope this works for you

answered