SQL Developer: How to enter new line character in Find & Replace?

How do you enter a new line character in using SQL Developer's > Find & Replace ?  For example,  I want to find "ABCD" and replace it with:

       AB               <-- new line character
       CD.

I've tried regex's, "\n", and a few other things but no luck. Anyone know the magic character(s)?
LVL 53
_agx_Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
If it is 4 characters you want split 2x2:

substr:
with mydata as (
select 'ABCD' mystr from dual
)
select substr(mystr,1,2) || chr(10) || substr(mystr,-2,2) from mydata
/


regexp_replace:
select regexp_replace('ABCD','([A-Z]{2})([A-Z]{2})','\1' || chr(10) || '\2') from dual;
0
Raheman M. AbdulSenior Infrastructure Support Analyst & Systems DeveloperCommented:
screenshotFollow the screenshot.
I tried to find Timestamp and replace with Time \n Stamp which results as:
Time
Stamp
(see screenshot). You need to tick Use and select "Regular expressions"
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
slightwv (䄆 Netminder) Commented:
Sorry. I missed the 'Find and Replace'.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

_agx_Author Commented:
@slightwv - No worries.

@Raheman Mohammed Abdul - Thanks, I'm actually using Oracle's SQL Developer, rather than SSMS, but ... that's a good idea. Let me give it a whirl...
0
_agx_Author Commented:
I'm still curious about how to do this in SQL Developer, but as I have SSMS too this did exactly what I needed. Thanks for kick-starting my brain ;-)
0
sdstuberCommented:
Using SQL Developer 4.0  a simple Ctrl-F  search and replace worked just fine for me  to embed new lines into my text


Ctrl-F   search and replace
0
Raheman M. AbdulSenior Infrastructure Support Analyst & Systems DeveloperCommented:
Thanks _agx_
0
_agx_Author Commented:
@Raheman Mohammed Abdul - Thanks again for your help.  If it's okay with everyone, I'd like to reopen this thread and split the points.  I didn't see sdstuber's response until later, and it was also helpful.  It led me to figuring out how to make it work in SQL Developer too. Now I have too good options :)

@sdstuber - Your response made me take another look at it. I'm using 4.0.2 so the my options are slightly different. In addition to the options you mentioned, I also checked the one below. Then it worked perfectly. Thanks!


When replacing:

[x] Substitute Escaped characters
0
Raheman M. AbdulSenior Infrastructure Support Analyst & Systems DeveloperCommented:
just send message to admin to reopen this and split points whatever you wish to.
0
_agx_Author Commented:
Thanks for the help everyone. Much appreciated.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.