title: How to remove a fragment from url with perl
body: <p>I have a url <a href="https://nasheidp.com/app/dynamicvalue/exkkilism6wisasas/sso/saml" rel="nofollow noreferrer">https://nasheidp.com/app/dynamicvalue/exkkilism6wisasas/sso/saml</a> and i want to remove the dynamicvalue from the url and the result should be</p>
  <blockquote>
  <p><a href="https://nasheidp.com/app/exkkilism6wisasas/sso/saml" rel="nofollow noreferrer">https://nasheidp.com/app/exkkilism6wisasas/sso/saml</a></p>
  </blockquote>
  <p>The value after app/ and before /exkkilism6wisasas  is completely dynamic.</p>
  <p>I am trying something like this</p>
  <pre><code>use URI ();
  
  $u1 = URI-&gt;new(&quot;https://nasheidp.com/app/dynamicvalue/exkkilism6wisasas/sso/saml&quot;);
  $u1-&gt;path(&quot;thereplacedwith&quot;);
  print $u1;
  </code></pre>