title: Remove last slash from URL with regex
body: <p>I have the following regex to remove last slash from a URL:</p>
  
  <pre><code>(.*)\/
  </code></pre>
  
  <p>i.e.: <a href="http://www.domain.com/clients/" rel="noreferrer">http://www.domain.com/clients/</a></p>
  
  <p>If applied the regex to the example, it does the work fine, but the problem is when the URL does not have the last slash (it occur from time to time). It removes <strong>/clients</strong>.</p>
  
  <p>How can I avoid this situation?</p>