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_SUBSTR - skip comma inside double quotes

OraDev16Jul 23 2019 — edited Jul 23 2019

Hi All,

I'm doing the following -

declare

vData           varchar2(500) := 'A,B,C,D,E,"F, F1",G,H';

vTmp            varchar2(100);

begin

select REGEXP_SUBSTR(vData ||',', '([^,]*),|$', 1, 6, NULL, 1)

into    vTmp

from dual;

dbms_output.put_line(vTmp);

end;

Result - "F

Desired Result - "F, F1"

Thank You

Comments
Post Details
Added on Jul 23 2019
2 comments
2,740 views