title: Extract number from string with Oracle function
body: <p>I need to create an Oracle DB function that takes a string as parameter. The string contains letters and numbers. I need to extract all the numbers from this string. For example, if I have a string like <strong>RO1234</strong>, I need to be able to use a function, say <code>extract_number('RO1234')</code>, and the result would be <strong>1234</strong>. </p>
  
  <p>To be even more precise, this is the kind of SQL query which this function would be used in.</p>
  
  <pre><code>SELECT DISTINCT column_name, extract_number(column_name) 
  FROM table_name
  WHERE extract_number(column_name) = 1234;
  </code></pre>
  
  <p>QUESTION: How do I add a function like that to my Oracle database, in order to be able to use it like in the example above, using any of Oracle SQL Developer or SQLTools client applications?</p>