Solved

Parse through a String Value to extract only numeric values

Posted on 2013-06-25
5
337 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 76

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 76

Expert Comment

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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now