I need to replace a substring of arbitrary length. For example between two spaces.
Example
String str = "Insert random message here";
// Manipulation
System.out.println(str);
// Outputs: Insert a message here
I have searched for a method in the String-class but I haven't found a useful one. (It might be because my bad English...)