my $string = " * [[Test789][Test123]]"; my ( $teilstring ) = $string =~ /\]\[([^\]]+)/; print "$teilstring\n";