Notepad++ find and replace string with a new-line

Most of the times DBA’s need to edit blocks of PL/SQL or SQL scripts and perform some modifications. Notepad++ is a very powerful and lightweight tool to perform edits.

 

Lets say you have a document with text like below:

 

111

XYZ

DCD

999 ABC

Now you need  add a line break if you find pattern 999

In the lower left hand corner of the Replace box, you’ll see a section called “Search Mode”. Just select the “Extended (\n, \r, \t, , \x…)” choice and you can enter in \r as the replace variable and it will put the line break in.

notepad

 

 

The new file would look like below:

111

XYZ

DCD

999

ABC

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s