title: Cut string after first occurrence of a character
body: <p>I have strings like 'keepme:cutme' or 'string-without-separator' which should become respectively 'keepme' and 'string-without-separator'. Can this be done in PostgreSQL? I tried:</p>
  
  <pre><code>select substring('first:last' from '.+:')
  </code></pre>
  
  <p>But this leaves the <code>:</code> in and won't work if there is no <code>:</code> in the string.</p>