title: Mysql function that repalce .com/**** ignore with .com
body: <p>is there a function in mysql that replace say my attribute is "URL" </p>
  
  <p>if I use replace would be </p>
  
  <pre><code>REPLACE(URL,".com/index" , ".com") 
  </code></pre>
  
  <p>but I want to be able to replace anything else after .com  -> ".com/*" with ".com" 
  Is there an easy way I can do this using function ? </p>