title: Replace contents of regexp_matches
body: <p>I've got a regular expression that looks for certain types of numbers in a text string.</p>
  
  <pre><code>select regexp_matches
  ('+(+number: 921163 +number:(814541)) +(number: 770593 number: 772526 number: 771130) +numberer:9088054599082069', ' [0-9]\{6\} |[(][0-9]\{6\}[)]|:[0-9]{6} | [0-9]{6}', 'g');
  </code></pre>
  
  <p>That query successfully returns the numbers I'm interested in, albeit with some extra characters:</p>
  
  <pre><code>{" 921163 "}
  {(814541)}
  {" 770593 "}
  {" 772526 "}
  {" 771130"}
  </code></pre>
  
  <p>I'd like to then strip out all of the extra, non-numeric characters (spaces, parenthesis, etc.) from that result:</p>
  
  <pre><code>{921163}
  {814541}
  {770593}
  {772526}
  {771130}
  </code></pre>
  
  <p>I've tried wrapping my regexp_matches term with a regexp_replace, and regular old replace, but I haven't had any luck.</p>