Help with Java Edit Variable


As a non-Java person, I want to use the Java Edit Variable (simple) node to take a DATE-TIME variable from the Date Input (Labs) node and remove the colon and semi-colon characters

e.g. 2015-04-08;08:34  turned into 2015-04-08-08-34

I have no idea how to write a string.replaceAll java command - can someone help???

Thanks all!



String#replaceAll works with reg exes, so you have to specify a regular expression for your search string, or instead simply use two chained String#replace instead:

String input = "2015-04-08;08:34";
String output = input.replace(";", "-").replace(":", "-");
// alternative using regular expression
String output = input.replaceAll("[;:]", "-");