title: Errorproof way to define active link in HTML, based on current URL in address bar
body: <p>The link in the HTML might be an absolute path or a relative one
  <br>It might have query parameters or not
  <br>It might have a hash or not</p>
  
  <p>The current URL can similarly be/have anything</p>
  
  <p>Is there a safe/errorproof JS way to check whether a link in the HTML is the "active" one by comparing it to the current URL ?</p>
  
  <p>I assume some regex will have to be used on the <code>&lt;a href&gt;</code> and another one on the <code>address bar URL</code> and compare the two but is there a known/standard way of successfully achieving this?</p>
  
  <p>I wanted to check whether this is already known to be bound to fail, before I actually start trying out solutions :D</p>
  
  <p>Thanks!</p>