Christian Kruse: RegEx für geschachtelte Klammern?

Beitrag lesen

Joho,

probier mal das hier:

$str = "asdf {otto rolf erwin} qwertz";

$str =~ /{(.*?)}/;
print "$1\n";

Das war ein Schnellschuss ;-) Das Problem ist folgendes:

public int methodenname(void)
 {
   if(bed)
    {
     if(bed)
      {
      }
    }
   else
    {
     if(bed)
      {
       if(bed)
        {
        }
      }
    }
 }

Gruss,
 CK