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!

remove punct except &;,

new learnerSep 27 2011 — edited Sep 28 2011
version oracle 10g
SELECT REGEXP_REPLACE('ABC DEFG!@#$%&;.,)(*^EFG HIJKL','[^&;,][[:punct:]from dual;

Output
ABC DEFG&;,EFG HIJKL

i know i can do it like this 
 SELECT REGEXP_REPLACE ('ABC DEFG!@#$%&;.,)(*^EFG HIJKL','[!~`@#$%^*()-+=\|"''\.\from dual;

but just out of curiosity ... there should be an effecient way with out typing all special characters.
{code}

Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
This post has been answered by Frank Kulash on Sep 27 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2011
Added on Sep 27 2011
4 comments
5,107 views