title: Remove full URL from Image path jquery
body: <p>I have an application that stores the relative path of an image file in a DB. I need to remove any fully qualified URL from the path before I insert it into the database. I was using the following. </p>
  
  <pre><code>$('img', this).attr('src').replace(/https?:\/\/[^\/]+/, ''); 
  </code></pre>
  
  <p>However, this still puts the / in front of the image path</p>
  
  <p>I start with this <code>http://192.168.72.80/upload/11/img_3070.jpg</code></p>
  
  <p>and I want to end up with this. 
  upload/11/img_3070.jpg</p>
  
  <p>The URL could be an IP, domain so I have to be able to deal with both scenarios. </p>
  
  <p>Thanks</p>