Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Regular expression to extract numbers

Yellow75May 23 2016 — edited May 23 2016

Hi,

I'm trying to extract from a string only numbers that are in round brackets:

SELECT

REGEXP_REPLACE ( 'FGF(23) SAD8WED(35) (EDRF(FG9', '[^([:digit:])]', '-') AS REG

FROM DUAL;

Output:

---(23)----8---(35)-(----(--9

but i want to achieve this result:

----23----------35-----------

Thanks,

Igor

This post has been answered by BluShadow on May 23 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 20 2016
Added on May 23 2016
15 comments
997 views