I\'ve used the following regex to try to remove parentheses and everything within them in a string called name.
name
name.replaceAll(\"\\\\(.*\\\\)\"
If you read the Javadoc for String.replaceAll(), you'll notice that it specifies that the resulting string is the return value.
More generally, Strings are immutable in Java; they never change value.
String