title: difficulty in extracting only a part of URL
body: <p>I have stored a URL link in a vector as :</p>
  
  <pre><code> links &lt;- "https://www.amazon.in/Glass-Milk-Bottle-Clear-Pieces/dp/B01J9SKYYU&amp;sa=U&amp;ved=0ahUKEwiGkd_x8P3ZAhUOSY8KHZUVBg0QFggmMAA&amp;usg=AOvVaw1wAFHoDLiP94xbl9JJsp8E"
  </code></pre>
  
  <p>And I wanted to extract only one part of the above url:
  i.e. "<a href="https://www.amazon.in/Glass-Milk-Bottle-Clear-Pieces/dp/B01J9SKYYU" rel="nofollow noreferrer">https://www.amazon.in/Glass-Milk-Bottle-Clear-Pieces/dp/B01J9SKYYU</a>"</p>
  
  <p>What I am trying to do is in the below code but I could not do that..</p>
  
  <pre><code> library(stringr)
   upattern &lt;- "http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&amp;+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+"
   ExtractedURL &lt;- str_extract(links[1], upattern)
  </code></pre>
  
  <p>Where I did make the mistake?</p>