In Oracle PL / SQL, I have to write the following:
SELECT TRIM ( REPLACE ( REPLACE ( REGEXP_REPLACE ( 'Fax received from 323 ( 123 )', '[ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*( [0123456789]* )', '', 1, 1, 'cm'), ')', ''), '(', '')) FROM DUAL;
The result of the SELECTed expression is 123.
source share