title: Getting the sum of fields made numeric with regexp_replace
body: <p>In Oracle I need to get a sum of numbers from a string field.  These numbers may include a ..  I've tried the following query:</p>
  <pre class="lang-sql prettyprint-override"><code>SELECT line_id, SUM(footage)
    FROM (SELECT line_id,
                 CASE
                   WHEN footage IS NULL THEN
                    0
                   ELSE
                    TO_NUMBER(REGEXP_REPLACE(footage, '[^0-9.]+', ''))
                 END AS footage
            FROM pipe)
   GROUP BY service_line_id
  </code></pre>
  <p>This gives an error on the REGEXP_REPLACE that it is an invalid number.  It works if I leave out the decimal point, but I really need to include it.  How do I get the sum with the decimal point included in the regular expression?</p>