org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script81.groovy: 11: unexpected token: @ line 11, column 63. sponse.replace("[\n\r]*", "" ) ^ org.codehaus.groovy.syntax.SyntaxException: unexpected token: @ line 11, column 63. at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:143) at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:111) at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:237) at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:167) at org.codehaus.groovy.control.
....
*/
Whats wrong here?
PS: I am using ReadyAPI 2.0.2
PPS: yes, I have also tried to do it with xpath “normalize-space()”, but there I have another problem - the XML-Structure is lost… maybe I have to post another question about that…
Originally posted by avidCoder on February 20, 2018
You should know that replace() or replaceAll() method takes only 2 arguments within quotes like this :- replace(“”, “”) This is not the correct way of using this method :- replace(/*,“\s+”, “”) and by the way, what is your input String and what is your expected output?
Originally posted by shamane2000 on February 20, 2018
@ashutoshanshu wrote:
…and by the way, what is your input String and what is your expected output?
I have a lot of properties, containing xml parts (with linebreaks) and I want to linearize them for using in a *.csv file.And save csv with aditionally linebreaks are … :smileymad:
And because all of my tries with xpath and xqerry were unsucsessfully, I trieed it now with a grovy script.