Hi Experts,
I'm trying to
un-escape the data of a table column using the package function - UTL_URL.Unescape
But the problem is my column is a CLOB and length of my data exceeds that acceptable by the function.
So, i'm just trying to simulate that function behavior normally.
My logic is to scan all characters with pattern '%yy' (HEX) and then convert it into DECIMAL using TO_CHAR(,'XX')
But got stuck in this regexp-replace.
Am I going correct...? Any help guys...??
with xx as(
select '<p>%3Cp%3Ewefwef%3C/p%3E</p>' col from dual
)
select
UTL_URL.unescape(col) x1,
regexp_replace(col,'%([a-zA-Z0-9]){2}','\2|.') x2
from
xx;
gives
<p><p>wefwef</p></p>
<p>|.p|.wefwef|./p|.</p>
my database:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for Solaris: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
Thanks,
Ranit B.