I'm trying to extract numbers and units from a input string. I was able to extract the number, but unable extract the units.
WITH smpl AS
(
SELECT '8.23 ug/dL' str FROM DUAL UNION
SELECT 'negative' FROM DUAL UNION
SELECT '29.2 ' FROM DUAL UNION
SELECT '0.2 E.U./dL' FROM DUAL UNION
SELECT '-150 ng/mL' FROM DUAL
)
SELECT
str,
regexp_substr(str, '\.*[[:digit:]]+\.*[[:digit:]]*') num
FROM smpl;
desired output: