title: Regular expression to remove hostname and port from URL?
body: <p>I need to write some javascript to strip the hostname:port part from a url, meaning I want to extract the path part only.</p>
  
  <p>i.e. I want to write a function getPath(url) such that getPath("<a href="http://host:8081/path/to/something" rel="noreferrer">http://host:8081/path/to/something</a>") returns "/path/to/something"</p>
  
  <p>Can this be done using regular expressions?</p>