Parse through a String Value to extract only numeric values

Posted on 2013-06-25
Medium Priority
Last Modified: 2013-06-25
I have a situation on where I am receiving information or data from a vendor or third party. The problem is that they have a front end free form field that is designated for a phone number. I need to be able to parse through this field of data and only extract numeric data. So for an example, if I am given a free form value of:

Example A:
1 (404) 653-9832

End Result to Extract:

Is there an efficient way about going about this? I have no access or control on the vendors side to locking down the format on the front end. I am currently working on 11g Oracle database.

Thank You!
Question by:Seaghost
  • 3
  • 2
LVL 78

Accepted Solution

slightwv (䄆 Netminder) earned 1220 total points
ID: 39275266
Try this:
regexp_replace('1 (404) 653-9832','[^[:digit:]]')

Author Comment

ID: 39275322
Let me give it a try.

Author Comment

ID: 39275330
Yes, I think this can resolve my issue. Thank You So much slightwv.

Author Closing Comment

ID: 39275331
Wonderful service like always.
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39275336
Glad to help!

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question