title: Remove duplicate slashes and trailing slash
body: <p>How to remove duplicate slashes and trailing slash using regex?<br>
  For example:<br>
  origin URL: </p>
  
  <pre><code>http://localhost:8080////app//user/login///  
  </code></pre>
  
  <p>to  </p>
  
  <pre><code>http://localhost:8080/app/user/login
  </code></pre>