I have done some searching and would like advice on this problem:
I want to replace "labels":"Webapp" with "labels":["Webapp"]
I found the regex (\"labels\"\:\")+(([a-zA-Z]|\s|\-)+)+(\") with the following substitution "labels":["$2"]
I use the method replaceAll and the Talend editor.
I write output_row.json = output_row.json.replaceAll("(\"labels\"\:\")+(([a-zA-Z]|\s|\-)+)+(\")",""labels":["$2"]"); but It doesn't work.
Message détaillé: Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \ )
Then I escaped the characters, I did:
output_row.json = output_row.json.replaceAll("(\\"labels\\"\:\\")+(([a-zA-Z]|\\s|\-)+)+(\\")","\"labels\":[\"$2\"]");
But It doesn't work yet.
Please could you help me?
Thanks.

