Get rewrite result

Have a look at the Action Reference to see generally how requests are processed. After all the loading and init stuff happens, the parse_request action runs when the request is matched against the rewrite rules, and an object is passed containing all the registered query vars and the matched rule and query string.

function wpd_parse_request( $request ){
    echo $request->matched_query;
}
add_action( 'parse_request', 'wpd_parse_request' );

After the wp action runs, that same object is stashed in the wp global.

global $wp;
echo $wp->matched_query;

error code: 523