Notepad++ Regular expression find and delete a line

后端 未结 5 1483
梦如初夏
梦如初夏 2021-01-30 10:21

I am trying to find and delete a line using Notepad++

I need to find lines in this file (UNIX Format) that match the string \'#RedirectMatch Permanent

5条回答
  •  自闭症患者
    2021-01-30 11:12

    Using the "Replace all" functionality, you can delete a line directly by ending your pattern with:

    • If your file have linux (LF) line ending : $\n?
    • If your file have windows (CRLF) line ending : $(\r\n)?

    For instance, in your case :

    .*#RedirectMatch Permanent.*$\n?
    

提交回复
热议问题