+
+{
+ my $template = URI::Template->new( 'http://ex.com/profile/{username}/address' );
+ isa_ok( $template, 'URI::Template' );
+ my $uri = 'http://ex.com/profile/Test/addresses';
+ my %result = $template->deparse( $uri );
+ is_deeply( \%result, { username => undef }, 'regex properly terminated' );
+}