The code at the bottom gives me an error in the Code Outline window.

The code was already shown as invalid in earlier versions, too, although it compiled and ran without error.

Here's the complete code:
SET SERVEROUTPUT ON
declare
function remove_duplicates(
p\_in\_string varchar2
, p_delimiter varchar2
)
return varchar2
is
v\_result varchar2( 32000 );
begin
select listagg(
single\_values
, p\_delimiter
)
within group (order by single\_values)
into v\_result
from (select distinct trim(
regexp\_substr(
t.in\_string
, '\[^'
|| p\_delimiter
|| '\]+'
, 1
, levels.column\_value
)
)
as single\_values
from (select p\_in\_string in\_string
from dual) t
, table(
cast(
multiset(
select level
from dual
connect by level \<= length(
regexp\_replace(
t.in\_string
, '\[^'
|| p\_delimiter
|| '\]+'
)
)
+ 1
) as sys.odcinumberlist
)
) levels);
return v\_result;
end;
begin
DBMS_OUTPUT.PUT_LINE(remove_duplicates('1,2,3,2,3,4,5,3,2,2,2,4,5',','));
end;
Best regards,
Sabine