I browsing a log file in notepad++. The file has \r\n wherever a new line should start, but notepad just displays the \r\n characters:

[Header]\r\n2011-04-23 13:14:53,867 [1] DEBUG Themis.Program Enter application
2011-04-23 13:14:57,505 [1] DEBUG Themis.Program Exit application
[Footer]\r\n[Header]\r\n2011-04-23 13:23:15,690 [1] DEBUG Themis.Program Enter application

I'd like it to display it like this:

[Header]
2011-04-23 13:14:53,867 [1] DEBUG Themis.Program Enter application
2011-04-23 13:14:57,505 [1] DEBUG Themis.Program Exit application
[Footer]
[Header]
2011-04-23 13:23:15,690 [1] DEBUG Themis.Program Enter application

Is it possible to do this. Is there maybe another app that can do that?

link|improve this question
feedback

2 Answers

up vote 2 down vote accepted

Replace regexp \\r\\n with \n.

link|improve this answer
This works, but I don't want to do any replacements. Since I can control the log file contents, what should I log instead of \r\n to get notepad to recognize as 'new line'? – Yoav Apr 25 '11 at 14:50
1  
@Yoav: Make your program write real newline characters instead. – grawity Apr 25 '11 at 15:13
feedback

You can do it in 2 steps

Press CTRL + H to open Replace window

1) First make sure that the Search Mode is in Normal mode. Then replace \r\n with some meaningless random word such as: abcdefg (which you're sure that is not within your text)

2) Then change the Search mode to Extended or Regular expression mode and replace this word with \n

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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