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!

REGEXP_REPLACE

970021Mar 22 2013 — edited Mar 23 2013
How do I remove all characters from a string except for decimal numbers?

Examples:
if string = 'sdfdsf 1.4ds dsfs / ', I want to return '1.4'. I have this to remove all characters, but it also removes the dots:

SELECT REGEXP_REPLACE(col1, '[^0-9]+', '') FROM table1;
This post has been answered by Frank Kulash on Mar 22 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 20 2013
Added on Mar 22 2013
9 comments
2,401 views