title: Regex for find last incidence that is NOT the end character
body: <p>I have two URLs from which I need to extract (actually split before) the pagename, i.e. last text string after the last /. For example:</p>
  
  <pre><code>https://example.com/en/pagename
  https://example.com/en/pagename/
  </code></pre>
  
  <p>My current regex can find the last incidence of the "/" character, but when the / is at the end, I need to select the PREVIOUS / in order to break before the pagename.  Current regex is:</p>
  
  <pre><code>\/(?!.*\/)
  </code></pre>