Auf Thema antworten

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]



Oben