[Solved] Search for a string and assign the ones it is not in the braced brace to a new string


Do you mean by this:

String newStr = str.replaceAll("\\[.*?\\] ?", "");

1

solved Search for a string and assign the ones it is not in the braced brace to a new string