title: Extract all between 3rd and 5th occurrence of forward slashes in a URL string
body: <p>Using RegEx I am trying to extract everything between 3rd and 5th occurrences of forward slashed in URLs like <code>http://www.domain.tld/content/article/26849929.html</code>, that is, in this case, <code>content/article</code> part. </p>
  
  <p>Later, I will be replacing them in PHP code with the new aliases like <code>http://www.domain.tld/newalias/26849929.html</code> using the following PHP command:</p>
  
  <p><code>preg_replace($pattern, $replacement, $string);</code></p>
  
  <p>Would appreciate if someone could point out the shortest and most efficient way to me. Thanks!</p>