title: How can I join tables on a substring in a record?
body: <p>I have a table that associates names with account ID's, like this</p>
  
  <pre><code>**Accounts**
  name
  account_id
  </code></pre>
  
  <p>and another table like that assocates information with account uri's</p>
  
  <pre><code>**Info**
  information
  account_uri
  </code></pre>
  
  <p>An account uri looks like this: /some/random/path/123456/randomDigits</p>
  
  <p>Where 123456 is the accound_id associated with the user.</p>
  
  <p>How can I join these tables, and get a result like</p>
  
  <pre><code>**results**
  name
  information
  </code></pre>
  
  <p>It's an amazon redshift/postgresql database. Thanks for any advice!</p>