Notepad++ - "Replace with" adds new-line character after replaced text. How do I remove it?

22

1

Original text:

2###
Test 123

I am doing this operation:

Find what: 2###
Replace with: 2###\r\nText before 

Result:

2###
Text before
Test 123

Desired result:

2###
Text before Test 123

For some reason it adds a new-line after the replaced text. It seem to only happen when I add \r\n or \n in the Replace with.

How can I set it up so it does not insert this newline?

Kaah

Posted 2014-05-27T16:33:41.857

Reputation: 323

11+1 for question in the form of: Input, program(sure, you could call it a program), output, expected output. – Cruncher – 2014-05-27T18:08:49.650

Answers

27

Line 1 is actually 2###<new line>.

You are replacing 2### with 2###<newline>Text before, making the line (in effect) into 2###<newline>Text before<newline>.

You need to include the new line you want to replace in your search.

Find: 2###\r\n
Replace with: 2###\r\nText before

Ƭᴇcʜιᴇ007

Posted 2014-05-27T16:33:41.857

Reputation: 103 763