1

Here, I am trying to convert the value, where I don't understand I am going wrong. Your help is highly appreciated!

Here I am#44; THis is me there#39;s nowhere else on earth I rather be Here I am#44;

to

Here I am, THis is me there's nowhere else on earth I rather be Here I am,

For this I used the following query which didn't work, Can you please tell me where I am wrong?

select DBMS_XMLGEN.convert(REGEXP_REPLACE('Here I am#44; THis is me there#39;s nowhere else on earth I rather be Here I am#44;', '(#[[:digit:]]+;)','&\1'), 1 ) as message from dual;
2
  • WITH x AS (SELECT DBMS_XMLGEN.CONVERT(REGEXP_REPLACE('Here I am#44; THis is me there#39;s nowhere else on earth I rather be Here I am#44;', '(#[[:digit:]]+;)','&\1'), 1 ) AS message FROM dual) SELECT message, UTL_I18N.UNESCAPE_REFERENCE(message) conv_message from x;
    – Raj
    Jan 22, 2015 at 16:46
  • @Raj Can you please put this in answer that works! Thank you very much.
    – pratikch
    Jan 22, 2015 at 18:05

1 Answer 1

1

Here it is

WITH x AS (SELECT DBMS_XMLGEN.CONVERT(REGEXP_REPLACE('Here I am#44; THis is me there#39;s nowhere else on earth I rather be Here I am#44;', '(#[[:digit:]]+;)','&\1'), 1 ) AS message FROM dual) SELECT message, UTL_I18N.UNESCAPE_REFERENCE(message) conv_message from x;
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.