title: Get substring between 2 characters in PostgreSQL
body: <p>I am trying to get the characters between a URL like so in postgreSQL:</p>
  
  <blockquote>
    <p>www.abc.com/hello/xyz </p>
    
    <p>www.abc.com/hi/pqr</p>
    
    <p>www.abc.com/yellow/xyz </p>
  </blockquote>
  
  <p>I want to get </p>
  
  <blockquote>
    <p>hello</p>
    
    <p>hi</p>
    
    <p>yellow</p>
  </blockquote>
  
  <p>This is what I have so far:</p>
  
  <pre><code>select distinct substring(url, position('/' in url)+ 1) theURL from table;
  </code></pre>
  
  <p>I am only able to get the first "/" </p>
  
  <p>I am not sure how to get the position of the second one</p>