

Method 1: Use the replace function to Remove a Newline Character From the String in Python.Use ^\s* for “Find what” and leave “Replace with” blank.Select “Regular expression” under Search mode.To get rid of leading space(s) and all empty lines (even if the empty line contains spaces or tabs) follow the followings:

The double paragraph tags here indicate a blank line and replacing them with a single tag will remove the blank lines.2 How do you remove spaces after every line in Notepad++?

Just click on the 'Show/Hide ¶' option in Word's control bar to view the paragraph tags. How do I delete multiple blank lines in Word?
