I need to use find new lines (\n
) in a .txt
file and replace them with a backspace (\b
). Using this in the Find and Replace feature of Notepad++ successfully finds the new lines, (\n
), but replaces them with the characters "\b" instead of applying a backspace. How can this be done correctly?
Show activity on this post. Go to Edit menu, line operations and then click on "Remove Empty Lines" You get what you are trying with regular expression. Show activity on this post. Use regular expressions, in Find what:, enter \r\n and in Replace with: leave that blank.
The meaning of the \b escape sequence inside a regular expression depends on its syntactic context: inside a character class, it matches the backspace character; outside of a character class, it matches a word boundary.
\r\n
should work.
replace them with empty field and you will get your backspace(\b
) equivalent
A simple way would be Ctrl + J or Edit->Line Operations->Join Lines
I was also trying to replace \n with backspace, but the above solutions seems neat. Maybe it helps someone.
(I tried the \r\n solution and it seems both works the same way :) )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With