Hi Marco, only add one \ in front of the ) in the string VariableSplittedAndTrimmed:
That’s all. Then run the microflow again, and to prove that it works, see this screenshot having a breakpoint just after the ReplaceAll-function was completed, and with the values of the variables visible:
This also works if you would want to replace both braces and everything in it: (V-Zug, Insel and small customers), just set VariableSplittedAndTrimmed to this value:
Hi Marco,
It seems like the error is caused due to the parenthesis characters. This is because the replaceAll function has the second parameter of a Regular Expression (see documentation here).
To get around this issue you need to escape such characters with “\”.
For example this:
Client Tribe CH, Add on business billing (V-Zug, Insel and small customers)
Should be converted into this:
Client Tribe CH, Add on business billing \(V-Zug, Insel and small customers\)
This is now a valid regular expression:
A simple alternative (if you don't really want to use regular expressions) is to try using “\Q” and “\E” too for literal strings, example:
“\QClient Tribe CH, Add on business billing (V-Zug, Insel and small customers)\E”
I hope that solves your issue, best regards!
I'm struggling with the same problem and posted an idea for it:
https://forum.mendix.com/link/space/microflows/ideas/4063
Feel free to vote if you agee.