title: Return only numeric values from column - Postgresql
body: <p>I have several values in my <code>name</code> column within the <code>contacts</code> table similar to this one:</p>
  
  <p><code>test 3100509 DEMO NPS</code></p>
  
  <p>I want to return only the numeric piece of each value from <code>name</code>.</p>
  
  <p>I tried this:</p>
  
  <p><code>select substring(name FROM '^[0-9]+|.*') from contacts</code></p>
  
  <p>But that doesn't do it.</p>
  
  <p>Any thoughts on how to strip all characters that are not numeric from the returned values?</p>