Normal
Evtl. geht das in die Richtung was du suchst.[code=Java] public static void main ( String [] args ) throws IOException { System.out.println(removeEmptyBrackets("{ (}{ )}}{ test{ (}{ )}}")); } public static String removeEmptyBrackets(String expr) { expr = expr.replaceAll("\\{[\\{\\(\\[\\]\\)\\} ]+\\}", ""); return expr; }[/code]
Evtl. geht das in die Richtung was du suchst.
[code=Java] public static void main ( String [] args ) throws IOException {
System.out.println(removeEmptyBrackets("{ (}{ )}}{ test{ (}{ )}}"));
}
public static String removeEmptyBrackets(String expr) {
expr = expr.replaceAll("\\{[\\{\\(\\[\\]\\)\\} ]+\\}", "");
return expr;
}[/code]