Removing empty lines in Notepad++

前端 未结 22 1815
时光取名叫无心
时光取名叫无心 2020-11-28 00:04

How can I replace empty lines in Notepad++? I tried a find and replace with the empty lines in the find, and nothing in the replace, but it did not work; it probably needs r

22条回答
  •  攒了一身酷
    2020-11-28 00:43

    This worked for me:

    1. Press ctrl + h (Shortcut for replace)
    2. Write one of the following regex in find what box. [\n\r]+$ or ^[\n\r]+
    3. Leave Replace with box blank
    4. In Search Mode, select Regex
    5. Click on Replace All

      Done!

提交回复
热议问题