public static function getNest($input, $open = "(", $close = ")"){
         
         $pattern = '#\\'.$open.'((?>[^\\'.$open.'[\\'.$close.']+)|(?R))*\\'.$close.'#';
         $count = preg_match_all($pattern, $input, $matches);
         
         if($count > 0)
                return $matches[0][0];
         
    return false;
    }
public static function getNest($input, $open = "(", $close = ")"){
         
         $pattern = '#\\'.$open.'((?>[^\\'.$open.'[\\'.$close.']+)|(?R))*\\'.$close.'#';
         $count = preg_match_all($pattern, $input, $matches);
         
         if($count > 0)
                return $matches[0][0];
         
    return false;
    }
public static function getNest ( $ input , $ open = "(" , $ close = ")" ) { $ pattern = '#\\' . $ open . '((?>[^\\' . $ open . '[\\' . $ close . ']+)|(?R))*\\' . $ close . '#' ; $ count = preg_match_all ( $ pattern , $ input , $ matches ) ; if ( $ count > 0 ) return $ matches [ 0 ] [ 0 ] ; return false ; }
return anything within specified balanced brackets, including any nested brackets
@param string $input          source string
@param string $open           opening bracket. Default: '('
@param string $close          closing bracket. Default: ')'
return anything within specified balanced brackets including any nested brackets