title: REgex match for URL parameter
body: <p>I am trying to extract the name of the magnet link.  Here is my code:</p>
  
  <pre><code>use strict;
  use warnings;
  use v5.18.0;
  
  my $link = 'magnet:?xt=urn:btih:CD46E14A7D62A85607D0F38F0CEE6EE7FEA34209&amp;dn=inherent+vice+2014+dvdscr&amp;tr=udp%3A%2F%2Fexplodie.org%3A6969%2Fannounce&amp;tr=udp%3A%2F%2Fopen.demonii.com%3A1337';
  
  $link =~ m/dn=(.*)&amp;/;
  my $link_text = $1;
  say $link_text;
  </code></pre>
  
  <p>The resulting $link_text includes characters after the capture group:
      inherent+vice+2014+dvdscr+xvid+ac3+evo&amp;tr=udp%3A%2F%2Finferno.demonoid.ph%3A3389%2Fannounce</p>
  
  <p>I can strip off the trailing parameters with a subsequent substitution:</p>
  
  <pre><code>$link_text =~ s/&amp;.*//;
  say $link_text;
  </code></pre>
  
  <p>Which returns what I'm looking for:
      inherent+vice+2014+dvdscr</p>
  
  <p>What am I doing wrong in the first regex?</p>