By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
with your_table as (
select '\Google earth\Nest global\ATAP' as TREE from dual union all
select '\Google earth\Nest\Beemoney\' from dual union all
select '\Google\\\BeeKey\' from dual
)
select
TREE,
regexp_replace(
regexp_replace(TREE, '^\\?(.*?)\\?$', '\1'), '\\+', ' > ')
from your_table
TREE | REGEXP_REPLACE(REGEXP_REPLACE(TREE,'^\?(.*?)\?$','\1'),'\+','>') |
---|---|
\Google earth\Nest global\ATAP | Google earth > Nest global > ATAP |
\Google earth\Nest\Beemoney\ | Google earth > Nest > Beemoney |
\Google\\BeeKey\ | Google > BeeKey |