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 removing comma within double quotes

PGMar 3 2015 — edited Mar 3 2015

Hi

I am  trying to remove comma from a string which are in double quotes, currently i can remove only one comma by using below sql

SELECT REGEXP_REPLACE('"A, B, C, def"','(")([^"|,]+)(,)([^"]+)(")','\1\2 \4\5') FROM DUAL;

output : "A  B, C, def"

But i need it as "A B C def"

This post has been answered by Frank Kulash on Mar 3 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 31 2015
Added on Mar 3 2015
9 comments
6,120 views