In Oracle, you can use the REGEXP_REPLACE function to extract numbers from a string. Here is an example:
SELECT REGEXP_REPLACE('abc123def456', '[^0-9]', '') AS numbers
FROM dual;
In the example above, the REGEXP_REPLACE function uses the regular expression ‘[^0-9]’ to match any non-numeric characters in the string and replace them with an empty string. This means that the resulting string will only contain the numeric part, which is ‘123456’.
You can also use other similar functions and regular expressions to extract numbers from the string, depending on your needs and the format of the string.