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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Regexp NOT

2921435Nov 18 2008 — edited Jan 27 2011
Hello,

I know that regexp_replace('abc1234abc','[^[:digit:]]',null) will give me a string replacing anything that is NOT a number wiyth NULL

select regexp_replace('abc1234abc56def','[^[:digit:]]',null) from dual ---> 123456

Now, if I change the question slightly to "replace eveything that is ** not ** a digit followed by an alpha with null how cna I do that

i.e, I want the answer to be

select regexp_replace('abc1234abc56def','[^[:digit:][:alpha:]]',null) from dual ---> I.E i WANT "4A" AND "6D" TO BE INTACT

HOW ??

THANKS IN ADVANCE
This post has been answered by BluShadow on Nov 18 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 24 2011
Added on Nov 18 2008
10 comments
30,734 views