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!

How To Extract a Fixed Length Number from a String

User_9RSSVJan 8 2013 — edited Jan 8 2013
Hi
I have a requirement to find all the 9 digit numbers from a string with any delimiter.
I have tried
SELECT REGEXP_SUBSTR(REPLACE('12345678978979798ZXC3ASD456FGH8TED63456789123',' '),'[[:digit:]]{9}') FROM dual
WHERE REGEXP_SUBSTR(REPLACE('12345678978979798ZXC3ASD456FGH8TED63456789123',' '),'[[:digit:]]{9}') IS NOT NULL;

It Gives me 123456789
But I want output as

123456789 634567891
Please Help.

Thanks
G
This post has been answered by 915396 on Jan 8 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 5 2013
Added on Jan 8 2013
10 comments
1,650 views