Unexpected internal error near index 1 \

2
When performing a change variable action, with the following expression: replaceAll($Variable,'\','') The following error occurs: at jD.b(SourceFile:38) Caused by: java.util.regex.PatternSyntaxException: Unexpected internal error near index 1 \ ^ The problem appears to be related to using the character '\' in the replaceAll function
asked
1 answers
4

\ is an escape character in Java, see here for more information.

Assuming you want to replace the \ with nothing (i.e. removing it effectively) the correct syntax would be: replaceAll($Variable,'\\','') as you need to escape the \ with a \ so it is not treated as an escape character (which you are currently not doing hence the error).

answered