title: Replace part of a URL with JavaScript
body: <p>I've found lots of articles around matching the URL and then replacing a certain part of just that particular URL...</p>
  
  <p>BUT!</p>
  
  <p>The website I need to change has around 25,000 URLs with the below string I need to replace! What I'm trying to do is:</p>
  
  <p>mysite.com/p/product_name_10011029</p>
  
  <p>And replace: /p/</p>
  
  <p>with</p>
  
  <p>mysite.com/product/product_name_10011029</p>
  
  <p>Again, there's 25,000 or so different pages that have /p/ in the URL so it can't match just one URL</p>