Solved

Parse through a String Value to extract only numeric values

Posted on 2013-06-25
5
342 Views
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:
14046539832

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!
0
Comment
Question by:Seaghost
  • 3
  • 2
5 Comments
 
LVL 77

Accepted Solution

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

Author Comment

by:Seaghost
ID: 39275322
Let me give it a try.
0
 

Author Comment

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

Author Closing Comment

by:Seaghost
ID: 39275331
Wonderful service like always.
0
 
LVL 77

Expert Comment

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

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Toad 12.10 Enterprise visual interface 4 33
date show only hh:mm 2 40
plsql job on oracle 18 78
looking for guidance on Oracle Sql Formatting standards 9 30
This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

733 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