?
Solved

Parse through a String Value to extract only numeric values

Posted on 2013-06-25
5
Medium Priority
?
350 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 78

Accepted Solution

by:
slightwv (䄆 Netminder) earned 1220 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 78

Expert Comment

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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to recover a database from a user managed backup
Suggested Courses

839 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