J'ai essayé ceci:groovy: comment ReplaceAll ')' avec ''
def str1="good stuff 1)"
def str2 = str1.replaceAll('\)',' ')
mais je suis l'erreur suivante:
Exception org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Script11.groovy: 3: unexpected char: '\' @ line 3, column 29. 1 error at org.codehaus.groovy.control.ErrorCollector(failIfErrors:296)
si la question est de savoir comment ce que je fais:
str1.replaceAll('\)',' ')