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 replace multiple CHR(10) with single CHR(10)

MarwimApr 4 2011 — edited Apr 4 2011
Hello,

I can replace multiple spaces with a single space
SELECT REGEXP_REPLACE('#  #','( )* ',' ') x FROM dual;
X
---
# #
but how can I replace multiple CR?
SELECT REGEXP_REPLACE('#'||CHR(10)||CHR(10)||'#','('||CHR(10)||')* ',CHR(10)) x FROM dual;
does not work. How do I have to write the pattern?

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

Regards
Marcus
This post has been answered by Sayan Malakshinov. on Apr 4 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 2 2011
Added on Apr 4 2011
7 comments
7,728 views